Merge lp:~elopio/ubuntuone-testing/fix-1017525 into lp:ubuntuone-testing

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 100
Merged at revision: 100
Proposed branch: lp:~elopio/ubuntuone-testing/fix-1017525
Merge into: lp:ubuntuone-testing
Prerequisite: lp:~elopio/ubuntuone-testing/fix-1017518
Diff against target: 157 lines (+40/-48)
4 files modified
ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py (+2/-5)
ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py (+2/-7)
ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py (+2/-7)
ubuntuone/web/tests/sst/shared/actions/services.py (+34/-29)
To merge this branch: bzr merge lp:~elopio/ubuntuone-testing/fix-1017525
Reviewer Review Type Date Requested Status
Rick McBride (community) Approve
Review via email: mp+111864@code.launchpad.net

This proposal supersedes a proposal from 2012-06-25.

Commit message

Added the actions for the Add Storage page. Fixes lp:1017525.

Description of the change

Added the actions for the Add Storage page. Fixes lp:1017525.

To post a comment you must log in.
Revision history for this message
Rick McBride (rmcbride) :
review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py'
2--- ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py 2012-03-27 19:04:46 +0000
3+++ ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py 2012-06-25 14:42:26 +0000
4@@ -1,10 +1,6 @@
5 # -*- coding: utf-8 -*-
6
7-# Authors:
8-# Rick McBride <rick.mcbride@canonical.com>
9-# Leo Arias <leo.arias@canonical.com>
10-#
11-# Copyright 2011 Canonical Ltd.
12+# Copyright 2011, 2012 Canonical Ltd.
13 #
14 # This program is free software: you can redistribute it and/or modify it
15 # under the terms of the GNU General Public License version 3, as published
16@@ -26,6 +22,7 @@
17
18 setup_actions.setup()
19 services_actions.open()
20+services_actions.click_add_extra_storage()
21 services_actions.assert_storage(1)
22 services_actions.increase_storage_quantity()
23 services_actions.assert_storage(2)
24
25=== modified file 'ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py'
26--- ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py 2012-03-27 19:04:46 +0000
27+++ ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py 2012-06-25 14:42:26 +0000
28@@ -1,10 +1,6 @@
29 # -*- coding: utf-8 -*-
30
31-# Authors:
32-# Rick McBride <rick.mcbride@canonical.com>
33-# Leo Arias <leo.arias@canonical.com>
34-#
35-# Copyright 2011 Canonical Ltd.
36+# Copyright 2011, 2012 Canonical Ltd.
37 #
38 # This program is free software: you can redistribute it and/or modify it
39 # under the terms of the GNU General Public License version 3, as published
40@@ -27,7 +23,6 @@
41
42 setup_actions.setup()
43 services_actions.open()
44-services_actions.set_storage_quantity(5)
45-services_actions.buy_extra_storage_monthly()
46+services_actions.buy_extra_storage_monthly(5)
47 payment_actions.assert_page_title()
48 payment_actions.assert_monthly_extra_storage_subscription(5)
49
50=== modified file 'ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py'
51--- ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py 2012-03-27 19:04:46 +0000
52+++ ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py 2012-06-25 14:42:26 +0000
53@@ -1,10 +1,6 @@
54 # -*- coding: utf-8 -*-
55
56-# Authors:
57-# Rick McBride <rick.mcbride@canonical.com>
58-# Leo Arias <leo.arias@canonical.com>
59-#
60-# Copyright 2011 Canonical Ltd.
61+# Copyright 2011, 2012 Canonical Ltd.
62 #
63 # This program is free software: you can redistribute it and/or modify it
64 # under the terms of the GNU General Public License version 3, as published
65@@ -27,7 +23,6 @@
66
67 setup_actions.setup()
68 services_actions.open()
69-services_actions.set_storage_quantity(5)
70-services_actions.buy_extra_storage_yearly()
71+services_actions.buy_extra_storage_yearly(5)
72 payment_actions.assert_page_title()
73 payment_actions.assert_annually_extra_storage_subscription(5)
74
75=== modified file 'ubuntuone/web/tests/sst/shared/actions/services.py'
76--- ubuntuone/web/tests/sst/shared/actions/services.py 2012-06-25 14:42:26 +0000
77+++ ubuntuone/web/tests/sst/shared/actions/services.py 2012-06-25 14:42:26 +0000
78@@ -1,10 +1,6 @@
79 # -*- coding: utf-8 -*-
80
81-# Authors:
82-# Rick McBride <rick.mcbride@canonical.com>
83-# Leo Arias <leo.arias@canonical.com>
84-#
85-# Copyright 2011 Canonical Ltd.
86+# Copyright 2011, 2012 Canonical Ltd.
87 #
88 # This program is free software: you can redistribute it and/or modify it
89 # under the terms of the GNU General Public License version 3, as published
90@@ -106,6 +102,39 @@
91 def _select_music_streaming_yearly():
92 set_radio_value('ms2')
93
94+def buy_extra_storage_monthly(quantity):
95+ """Buy the monthly extra storage service."""
96+ click_add_extra_storage()
97+ set_storage_quantity(quantity)
98+ _select_extra_storage_montly()
99+ _click_next_checkout_button()
100+
101+def click_add_extra_storage():
102+ add_extra_storage_link = get_element(text='Add extra Storage')
103+ click_link(add_extra_storage_link)
104+
105+def set_storage_quantity(quantity):
106+ """Set the storage quantity to buy.
107+
108+ Keyword arguments:
109+ quantity -- The quantity to buy.
110+
111+ """
112+ write_textfield('qty', str(quantity))
113+
114+def _select_extra_storage_montly():
115+ set_radio_value('st1')
116+
117+def buy_extra_storage_yearly(quantity):
118+ """Buy the yearly extra storage service."""
119+ click_add_extra_storage()
120+ set_storage_quantity(quantity)
121+ _select_extra_storage_yearly()
122+ _click_next_checkout_button()
123+
124+def _select_extra_storage_yearly():
125+ set_radio_value('st2')
126+
127 def assert_storage(quantity):
128 """Asert the storage quantity selected and its space and price.
129
130@@ -127,27 +156,3 @@
131 def decrease_storage_quantity():
132 """Click the button that decreases the storage quantity to buy."""
133 click_button('minus_qty')
134-
135-def set_storage_quantity(quantity):
136- """Set the storage quantity to buy.
137-
138- Keyword arguments:
139- quantity -- The quantity to buy.
140-
141- """
142- write_textfield('qty', str(quantity))
143-
144-def buy_extra_storage_monthly():
145- """Buy the monthly extra storage service."""
146- set_radio_value('st1')
147- buy_extra_storage()
148-
149-def buy_extra_storage_yearly():
150- """Buy the yearly extra storage service."""
151- set_radio_value('st2')
152- buy_extra_storage()
153-
154-def buy_extra_storage():
155- """Click the button to buy extra storage."""
156- click_button(get_elements(css_class='buy-now',
157- text='Buy now and go to checkout')[1])

Subscribers

People subscribed via source and target branches