Merge lp:~elopio/ubuntuone-testing/skip-services-payments into lp:ubuntuone-testing

Proposed by Leo Arias
Status: Superseded
Proposed branch: lp:~elopio/ubuntuone-testing/skip-services-payments
Merge into: lp:ubuntuone-testing
Diff against target: 290 lines (+69/-68)
9 files modified
ubuntuone/web/tests/sst/payments/u1webp001_paymusicstreaming.py (+1/-0)
ubuntuone/web/tests/sst/payments/u1webp002_payadditionalstorage.py (+1/-0)
ubuntuone/web/tests/sst/payments/u1webp003_paywithrefusedcard.py (+1/-0)
ubuntuone/web/tests/sst/services/u1webse002_musicstreamingmonthly.py (+2/-5)
ubuntuone/web/tests/sst/services/u1webse003_musicstreamingannually.py (+2/-5)
ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py (+2/-5)
ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py (+3/-7)
ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py (+3/-7)
ubuntuone/web/tests/sst/shared/actions/services.py (+54/-39)
To merge this branch: bzr merge lp:~elopio/ubuntuone-testing/skip-services-payments
Reviewer Review Type Date Requested Status
Rick McBride Pending
Review via email: mp+111866@code.launchpad.net

This proposal has been superseded by a proposal from 2012-06-25.

Commit message

Skip the services tests that must be updated for Ubuntu Pay

Description of the change

Skip the services tests that must be updated for Ubuntu Pay.

To post a comment you must log in.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/web/tests/sst/payments/u1webp001_paymusicstreaming.py'
2--- ubuntuone/web/tests/sst/payments/u1webp001_paymusicstreaming.py 2012-03-27 19:04:46 +0000
3+++ ubuntuone/web/tests/sst/payments/u1webp001_paymusicstreaming.py 2012-06-25 14:49:17 +0000
4@@ -28,6 +28,7 @@
5 import actions.payment as payment_actions
6 import actions.payment_confirmed as payment_confirmed_actions
7
8+skip('This test must be updated for Ubuntu Pay.')
9 if ENVIRONMENT == 'production':
10 skip('Can\'t test payments on production.')
11 setup_actions.setup(new_user=True)
12
13=== modified file 'ubuntuone/web/tests/sst/payments/u1webp002_payadditionalstorage.py'
14--- ubuntuone/web/tests/sst/payments/u1webp002_payadditionalstorage.py 2012-03-27 19:04:46 +0000
15+++ ubuntuone/web/tests/sst/payments/u1webp002_payadditionalstorage.py 2012-06-25 14:49:17 +0000
16@@ -27,6 +27,7 @@
17 import actions.payment as payment_actions
18 import actions.payment_confirmed as payment_confirmed_actions
19
20+skip('This test must be updated for Ubuntu Pay.')
21 setup_actions.setup(new_user=True)
22 services_actions.open()
23 services_actions.buy_extra_storage()
24
25=== modified file 'ubuntuone/web/tests/sst/payments/u1webp003_paywithrefusedcard.py'
26--- ubuntuone/web/tests/sst/payments/u1webp003_paywithrefusedcard.py 2012-03-27 19:04:46 +0000
27+++ ubuntuone/web/tests/sst/payments/u1webp003_paywithrefusedcard.py 2012-06-25 14:49:17 +0000
28@@ -27,6 +27,7 @@
29 import actions.payment as payment_actions
30 import actions.payment_confirmed as payment_confirmed_actions
31
32+skip('This test must be updated for Ubuntu Pay.')
33 if ENVIRONMENT == 'production':
34 skip('Can\'t test payments on production.')
35 setup_actions.setup()
36
37=== modified file 'ubuntuone/web/tests/sst/services/u1webse002_musicstreamingmonthly.py'
38--- ubuntuone/web/tests/sst/services/u1webse002_musicstreamingmonthly.py 2012-03-27 19:04:46 +0000
39+++ ubuntuone/web/tests/sst/services/u1webse002_musicstreamingmonthly.py 2012-06-25 14:49:17 +0000
40@@ -1,10 +1,6 @@
41 # -*- coding: utf-8 -*-
42
43-# Authors:
44-# Rick McBride <rick.mcbride@canonical.com>
45-# Leo Arias <leo.arias@canonical.com>
46-#
47-# Copyright 2011 Canonical Ltd.
48+# Copyright 2011, 2012 Canonical Ltd.
49 #
50 # This program is free software: you can redistribute it and/or modify it
51 # under the terms of the GNU General Public License version 3, as published
52@@ -25,6 +21,7 @@
53 import actions.services as services_actions
54 import actions.payment as payment_actions
55
56+skip('This test must be updated for Ubuntu Pay.')
57 setup_actions.setup()
58 services_actions.open()
59 services_actions.buy_music_streaming_monthly()
60
61=== modified file 'ubuntuone/web/tests/sst/services/u1webse003_musicstreamingannually.py'
62--- ubuntuone/web/tests/sst/services/u1webse003_musicstreamingannually.py 2012-03-27 19:04:46 +0000
63+++ ubuntuone/web/tests/sst/services/u1webse003_musicstreamingannually.py 2012-06-25 14:49:17 +0000
64@@ -1,10 +1,6 @@
65 # -*- coding: utf-8 -*-
66
67-# Authors:
68-# Rick McBride <rick.mcbride@canonical.com>
69-# Leo Arias <leo.arias@canonical.com>
70-#
71-# Copyright 2011 Canonical Ltd.
72+# Copyright 2011, 2012 Canonical Ltd.
73 #
74 # This program is free software: you can redistribute it and/or modify it
75 # under the terms of the GNU General Public License version 3, as published
76@@ -25,6 +21,7 @@
77 import actions.services as services_actions
78 import actions.payment as payment_actions
79
80+skip('This test must be updated for Ubuntu Pay.')
81 setup_actions.setup()
82 services_actions.open()
83 services_actions.buy_music_streaming_yearly()
84
85=== modified file 'ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py'
86--- ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py 2012-03-27 19:04:46 +0000
87+++ ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py 2012-06-25 14:49:17 +0000
88@@ -1,10 +1,6 @@
89 # -*- coding: utf-8 -*-
90
91-# Authors:
92-# Rick McBride <rick.mcbride@canonical.com>
93-# Leo Arias <leo.arias@canonical.com>
94-#
95-# Copyright 2011 Canonical Ltd.
96+# Copyright 2011, 2012 Canonical Ltd.
97 #
98 # This program is free software: you can redistribute it and/or modify it
99 # under the terms of the GNU General Public License version 3, as published
100@@ -26,6 +22,7 @@
101
102 setup_actions.setup()
103 services_actions.open()
104+services_actions.click_add_extra_storage()
105 services_actions.assert_storage(1)
106 services_actions.increase_storage_quantity()
107 services_actions.assert_storage(2)
108
109=== modified file 'ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py'
110--- ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py 2012-03-27 19:04:46 +0000
111+++ ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py 2012-06-25 14:49:17 +0000
112@@ -1,10 +1,6 @@
113 # -*- coding: utf-8 -*-
114
115-# Authors:
116-# Rick McBride <rick.mcbride@canonical.com>
117-# Leo Arias <leo.arias@canonical.com>
118-#
119-# Copyright 2011 Canonical Ltd.
120+# Copyright 2011, 2012 Canonical Ltd.
121 #
122 # This program is free software: you can redistribute it and/or modify it
123 # under the terms of the GNU General Public License version 3, as published
124@@ -25,9 +21,9 @@
125 import actions.services as services_actions
126 import actions.payment as payment_actions
127
128+skip('This test must be updated for Ubuntu Pay.')
129 setup_actions.setup()
130 services_actions.open()
131-services_actions.set_storage_quantity(5)
132-services_actions.buy_extra_storage_monthly()
133+services_actions.buy_extra_storage_monthly(5)
134 payment_actions.assert_page_title()
135 payment_actions.assert_monthly_extra_storage_subscription(5)
136
137=== modified file 'ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py'
138--- ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py 2012-03-27 19:04:46 +0000
139+++ ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py 2012-06-25 14:49:17 +0000
140@@ -1,10 +1,6 @@
141 # -*- coding: utf-8 -*-
142
143-# Authors:
144-# Rick McBride <rick.mcbride@canonical.com>
145-# Leo Arias <leo.arias@canonical.com>
146-#
147-# Copyright 2011 Canonical Ltd.
148+# Copyright 2011, 2012 Canonical Ltd.
149 #
150 # This program is free software: you can redistribute it and/or modify it
151 # under the terms of the GNU General Public License version 3, as published
152@@ -25,9 +21,9 @@
153 import actions.services as services_actions
154 import actions.payment as payment_actions
155
156+skip('This test must be updated for Ubuntu Pay.')
157 setup_actions.setup()
158 services_actions.open()
159-services_actions.set_storage_quantity(5)
160-services_actions.buy_extra_storage_yearly()
161+services_actions.buy_extra_storage_yearly(5)
162 payment_actions.assert_page_title()
163 payment_actions.assert_annually_extra_storage_subscription(5)
164
165=== modified file 'ubuntuone/web/tests/sst/shared/actions/services.py'
166--- ubuntuone/web/tests/sst/shared/actions/services.py 2012-06-01 16:09:57 +0000
167+++ ubuntuone/web/tests/sst/shared/actions/services.py 2012-06-25 14:49:17 +0000
168@@ -1,10 +1,6 @@
169 # -*- coding: utf-8 -*-
170
171-# Authors:
172-# Rick McBride <rick.mcbride@canonical.com>
173-# Leo Arias <leo.arias@canonical.com>
174-#
175-# Copyright 2011 Canonical Ltd.
176+# Copyright 2011, 2012 Canonical Ltd.
177 #
178 # This program is free software: you can redistribute it and/or modify it
179 # under the terms of the GNU General Public License version 3, as published
180@@ -72,29 +68,72 @@
181 get_element(tag='h2', text='Storage')
182 get_element(tag='li', text='20 GB')
183 get_element(tag='li', text='$2.99 / month')
184- get_element(tag='li', text='or $29.99 / year')
185+ get_element(tag='li', text='$29.99 / year')
186
187 def assert_discount_information():
188 """Assert that the yearly discount information is the expected."""
189- get_element(tag='h3', text='Discount')
190+ get_element(tag='h2', text='Discount')
191 get_element(tag='p', text='Two months free on Music Streaming and Storage '
192 'when you sign up for 12 months')
193
194 def buy_music_streaming_monthly():
195 """Buy the monthly music streaming service."""
196+ _click_add_music_streaming()
197+ _select_music_streaming_monthly()
198+ _click_next_checkout_button()
199+
200+def _click_add_music_streaming():
201+ add_music_streaming_link = get_element(text='Add Music Streaming')
202+ click_link(add_music_streaming_link)
203+
204+def _select_music_streaming_monthly():
205 set_radio_value('ms1')
206- click_button(get_elements(css_class='buy-now',
207- text='Buy now and go to checkout')[0])
208+
209+def _click_next_checkout_button():
210+ next_checkout_button = get_element(text='Next-checkout')
211+ click_button(next_checkout_button)
212
213 def buy_music_streaming_yearly():
214 """Buy the yearly music streaming service."""
215+ _click_add_music_streaming()
216+ _select_music_streaming_yearly()
217+ _click_next_checkout_button()
218+
219+def _select_music_streaming_yearly():
220 set_radio_value('ms2')
221- buy_music_streaming()
222-
223-def buy_music_streaming():
224- """Click the button to buy the music streaming service."""
225- click_button(get_elements(css_class='buy-now',
226- text='Buy now and go to checkout')[0])
227+
228+def buy_extra_storage_monthly(quantity):
229+ """Buy the monthly extra storage service."""
230+ click_add_extra_storage()
231+ set_storage_quantity(quantity)
232+ _select_extra_storage_montly()
233+ _click_next_checkout_button()
234+
235+def click_add_extra_storage():
236+ add_extra_storage_link = get_element(text='Add extra Storage')
237+ click_link(add_extra_storage_link)
238+
239+def set_storage_quantity(quantity):
240+ """Set the storage quantity to buy.
241+
242+ Keyword arguments:
243+ quantity -- The quantity to buy.
244+
245+ """
246+ write_textfield('qty', str(quantity))
247+
248+def _select_extra_storage_montly():
249+ set_radio_value('st1')
250+
251+def buy_extra_storage_yearly(quantity):
252+ """Buy the yearly extra storage service."""
253+ click_add_extra_storage()
254+ set_storage_quantity(quantity)
255+ _select_extra_storage_yearly()
256+ _click_next_checkout_button()
257+
258+def _select_extra_storage_yearly():
259+ set_radio_value('st2')
260
261 def assert_storage(quantity):
262 """Asert the storage quantity selected and its space and price.
263@@ -117,27 +156,3 @@
264 def decrease_storage_quantity():
265 """Click the button that decreases the storage quantity to buy."""
266 click_button('minus_qty')
267-
268-def set_storage_quantity(quantity):
269- """Set the storage quantity to buy.
270-
271- Keyword arguments:
272- quantity -- The quantity to buy.
273-
274- """
275- write_textfield('qty', str(quantity))
276-
277-def buy_extra_storage_monthly():
278- """Buy the monthly extra storage service."""
279- set_radio_value('st1')
280- buy_extra_storage()
281-
282-def buy_extra_storage_yearly():
283- """Buy the yearly extra storage service."""
284- set_radio_value('st2')
285- buy_extra_storage()
286-
287-def buy_extra_storage():
288- """Click the button to buy extra storage."""
289- click_button(get_elements(css_class='buy-now',
290- text='Buy now and go to checkout')[1])

Subscribers

People subscribed via source and target branches