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
=== modified file 'ubuntuone/web/tests/sst/payments/u1webp001_paymusicstreaming.py'
--- ubuntuone/web/tests/sst/payments/u1webp001_paymusicstreaming.py 2012-03-27 19:04:46 +0000
+++ ubuntuone/web/tests/sst/payments/u1webp001_paymusicstreaming.py 2012-06-25 14:49:17 +0000
@@ -28,6 +28,7 @@
28import actions.payment as payment_actions28import actions.payment as payment_actions
29import actions.payment_confirmed as payment_confirmed_actions29import actions.payment_confirmed as payment_confirmed_actions
3030
31skip('This test must be updated for Ubuntu Pay.')
31if ENVIRONMENT == 'production':32if ENVIRONMENT == 'production':
32 skip('Can\'t test payments on production.')33 skip('Can\'t test payments on production.')
33setup_actions.setup(new_user=True)34setup_actions.setup(new_user=True)
3435
=== modified file 'ubuntuone/web/tests/sst/payments/u1webp002_payadditionalstorage.py'
--- ubuntuone/web/tests/sst/payments/u1webp002_payadditionalstorage.py 2012-03-27 19:04:46 +0000
+++ ubuntuone/web/tests/sst/payments/u1webp002_payadditionalstorage.py 2012-06-25 14:49:17 +0000
@@ -27,6 +27,7 @@
27import actions.payment as payment_actions27import actions.payment as payment_actions
28import actions.payment_confirmed as payment_confirmed_actions28import actions.payment_confirmed as payment_confirmed_actions
2929
30skip('This test must be updated for Ubuntu Pay.')
30setup_actions.setup(new_user=True)31setup_actions.setup(new_user=True)
31services_actions.open()32services_actions.open()
32services_actions.buy_extra_storage()33services_actions.buy_extra_storage()
3334
=== modified file 'ubuntuone/web/tests/sst/payments/u1webp003_paywithrefusedcard.py'
--- ubuntuone/web/tests/sst/payments/u1webp003_paywithrefusedcard.py 2012-03-27 19:04:46 +0000
+++ ubuntuone/web/tests/sst/payments/u1webp003_paywithrefusedcard.py 2012-06-25 14:49:17 +0000
@@ -27,6 +27,7 @@
27import actions.payment as payment_actions27import actions.payment as payment_actions
28import actions.payment_confirmed as payment_confirmed_actions28import actions.payment_confirmed as payment_confirmed_actions
2929
30skip('This test must be updated for Ubuntu Pay.')
30if ENVIRONMENT == 'production':31if ENVIRONMENT == 'production':
31 skip('Can\'t test payments on production.')32 skip('Can\'t test payments on production.')
32setup_actions.setup()33setup_actions.setup()
3334
=== modified file 'ubuntuone/web/tests/sst/services/u1webse002_musicstreamingmonthly.py'
--- ubuntuone/web/tests/sst/services/u1webse002_musicstreamingmonthly.py 2012-03-27 19:04:46 +0000
+++ ubuntuone/web/tests/sst/services/u1webse002_musicstreamingmonthly.py 2012-06-25 14:49:17 +0000
@@ -1,10 +1,6 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
22
3# Authors: 3# Copyright 2011, 2012 Canonical Ltd.
4# Rick McBride <rick.mcbride@canonical.com>
5# Leo Arias <leo.arias@canonical.com>
6#
7# Copyright 2011 Canonical Ltd.
8#4#
9# This program is free software: you can redistribute it and/or modify it5# This program is free software: you can redistribute it and/or modify it
10# under the terms of the GNU General Public License version 3, as published6# under the terms of the GNU General Public License version 3, as published
@@ -25,6 +21,7 @@
25import actions.services as services_actions21import actions.services as services_actions
26import actions.payment as payment_actions22import actions.payment as payment_actions
2723
24skip('This test must be updated for Ubuntu Pay.')
28setup_actions.setup()25setup_actions.setup()
29services_actions.open()26services_actions.open()
30services_actions.buy_music_streaming_monthly()27services_actions.buy_music_streaming_monthly()
3128
=== modified file 'ubuntuone/web/tests/sst/services/u1webse003_musicstreamingannually.py'
--- ubuntuone/web/tests/sst/services/u1webse003_musicstreamingannually.py 2012-03-27 19:04:46 +0000
+++ ubuntuone/web/tests/sst/services/u1webse003_musicstreamingannually.py 2012-06-25 14:49:17 +0000
@@ -1,10 +1,6 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
22
3# Authors: 3# Copyright 2011, 2012 Canonical Ltd.
4# Rick McBride <rick.mcbride@canonical.com>
5# Leo Arias <leo.arias@canonical.com>
6#
7# Copyright 2011 Canonical Ltd.
8#4#
9# This program is free software: you can redistribute it and/or modify it5# This program is free software: you can redistribute it and/or modify it
10# under the terms of the GNU General Public License version 3, as published6# under the terms of the GNU General Public License version 3, as published
@@ -25,6 +21,7 @@
25import actions.services as services_actions21import actions.services as services_actions
26import actions.payment as payment_actions22import actions.payment as payment_actions
2723
24skip('This test must be updated for Ubuntu Pay.')
28setup_actions.setup()25setup_actions.setup()
29services_actions.open()26services_actions.open()
30services_actions.buy_music_streaming_yearly()27services_actions.buy_music_streaming_yearly()
3128
=== modified file 'ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py'
--- ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py 2012-03-27 19:04:46 +0000
+++ ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py 2012-06-25 14:49:17 +0000
@@ -1,10 +1,6 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
22
3# Authors: 3# Copyright 2011, 2012 Canonical Ltd.
4# Rick McBride <rick.mcbride@canonical.com>
5# Leo Arias <leo.arias@canonical.com>
6#
7# Copyright 2011 Canonical Ltd.
8#4#
9# This program is free software: you can redistribute it and/or modify it5# This program is free software: you can redistribute it and/or modify it
10# under the terms of the GNU General Public License version 3, as published6# under the terms of the GNU General Public License version 3, as published
@@ -26,6 +22,7 @@
2622
27setup_actions.setup()23setup_actions.setup()
28services_actions.open()24services_actions.open()
25services_actions.click_add_extra_storage()
29services_actions.assert_storage(1)26services_actions.assert_storage(1)
30services_actions.increase_storage_quantity()27services_actions.increase_storage_quantity()
31services_actions.assert_storage(2)28services_actions.assert_storage(2)
3229
=== modified file 'ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py'
--- ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py 2012-03-27 19:04:46 +0000
+++ ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py 2012-06-25 14:49:17 +0000
@@ -1,10 +1,6 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
22
3# Authors: 3# Copyright 2011, 2012 Canonical Ltd.
4# Rick McBride <rick.mcbride@canonical.com>
5# Leo Arias <leo.arias@canonical.com>
6#
7# Copyright 2011 Canonical Ltd.
8#4#
9# This program is free software: you can redistribute it and/or modify it5# This program is free software: you can redistribute it and/or modify it
10# under the terms of the GNU General Public License version 3, as published6# under the terms of the GNU General Public License version 3, as published
@@ -25,9 +21,9 @@
25import actions.services as services_actions21import actions.services as services_actions
26import actions.payment as payment_actions22import actions.payment as payment_actions
2723
24skip('This test must be updated for Ubuntu Pay.')
28setup_actions.setup()25setup_actions.setup()
29services_actions.open()26services_actions.open()
30services_actions.set_storage_quantity(5)27services_actions.buy_extra_storage_monthly(5)
31services_actions.buy_extra_storage_monthly()
32payment_actions.assert_page_title()28payment_actions.assert_page_title()
33payment_actions.assert_monthly_extra_storage_subscription(5)29payment_actions.assert_monthly_extra_storage_subscription(5)
3430
=== modified file 'ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py'
--- ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py 2012-03-27 19:04:46 +0000
+++ ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py 2012-06-25 14:49:17 +0000
@@ -1,10 +1,6 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
22
3# Authors: 3# Copyright 2011, 2012 Canonical Ltd.
4# Rick McBride <rick.mcbride@canonical.com>
5# Leo Arias <leo.arias@canonical.com>
6#
7# Copyright 2011 Canonical Ltd.
8#4#
9# This program is free software: you can redistribute it and/or modify it5# This program is free software: you can redistribute it and/or modify it
10# under the terms of the GNU General Public License version 3, as published6# under the terms of the GNU General Public License version 3, as published
@@ -25,9 +21,9 @@
25import actions.services as services_actions21import actions.services as services_actions
26import actions.payment as payment_actions22import actions.payment as payment_actions
2723
24skip('This test must be updated for Ubuntu Pay.')
28setup_actions.setup()25setup_actions.setup()
29services_actions.open()26services_actions.open()
30services_actions.set_storage_quantity(5)27services_actions.buy_extra_storage_yearly(5)
31services_actions.buy_extra_storage_yearly()
32payment_actions.assert_page_title()28payment_actions.assert_page_title()
33payment_actions.assert_annually_extra_storage_subscription(5)29payment_actions.assert_annually_extra_storage_subscription(5)
3430
=== modified file 'ubuntuone/web/tests/sst/shared/actions/services.py'
--- ubuntuone/web/tests/sst/shared/actions/services.py 2012-06-01 16:09:57 +0000
+++ ubuntuone/web/tests/sst/shared/actions/services.py 2012-06-25 14:49:17 +0000
@@ -1,10 +1,6 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
22
3# Authors: 3# Copyright 2011, 2012 Canonical Ltd.
4# Rick McBride <rick.mcbride@canonical.com>
5# Leo Arias <leo.arias@canonical.com>
6#
7# Copyright 2011 Canonical Ltd.
8#4#
9# This program is free software: you can redistribute it and/or modify it5# This program is free software: you can redistribute it and/or modify it
10# under the terms of the GNU General Public License version 3, as published6# under the terms of the GNU General Public License version 3, as published
@@ -72,29 +68,72 @@
72 get_element(tag='h2', text='Storage')68 get_element(tag='h2', text='Storage')
73 get_element(tag='li', text='20 GB')69 get_element(tag='li', text='20 GB')
74 get_element(tag='li', text='$2.99 / month')70 get_element(tag='li', text='$2.99 / month')
75 get_element(tag='li', text='or $29.99 / year')71 get_element(tag='li', text='$29.99 / year')
7672
77def assert_discount_information():73def assert_discount_information():
78 """Assert that the yearly discount information is the expected."""74 """Assert that the yearly discount information is the expected."""
79 get_element(tag='h3', text='Discount')75 get_element(tag='h2', text='Discount')
80 get_element(tag='p', text='Two months free on Music Streaming and Storage '76 get_element(tag='p', text='Two months free on Music Streaming and Storage '
81 'when you sign up for 12 months')77 'when you sign up for 12 months')
8278
83def buy_music_streaming_monthly():79def buy_music_streaming_monthly():
84 """Buy the monthly music streaming service."""80 """Buy the monthly music streaming service."""
81 _click_add_music_streaming()
82 _select_music_streaming_monthly()
83 _click_next_checkout_button()
84
85def _click_add_music_streaming():
86 add_music_streaming_link = get_element(text='Add Music Streaming')
87 click_link(add_music_streaming_link)
88
89def _select_music_streaming_monthly():
85 set_radio_value('ms1')90 set_radio_value('ms1')
86 click_button(get_elements(css_class='buy-now',91
87 text='Buy now and go to checkout')[0])92def _click_next_checkout_button():
93 next_checkout_button = get_element(text='Next-checkout')
94 click_button(next_checkout_button)
8895
89def buy_music_streaming_yearly():96def buy_music_streaming_yearly():
90 """Buy the yearly music streaming service."""97 """Buy the yearly music streaming service."""
98 _click_add_music_streaming()
99 _select_music_streaming_yearly()
100 _click_next_checkout_button()
101
102def _select_music_streaming_yearly():
91 set_radio_value('ms2')103 set_radio_value('ms2')
92 buy_music_streaming()104
93105def buy_extra_storage_monthly(quantity):
94def buy_music_streaming():106 """Buy the monthly extra storage service."""
95 """Click the button to buy the music streaming service."""107 click_add_extra_storage()
96 click_button(get_elements(css_class='buy-now',108 set_storage_quantity(quantity)
97 text='Buy now and go to checkout')[0])109 _select_extra_storage_montly()
110 _click_next_checkout_button()
111
112def click_add_extra_storage():
113 add_extra_storage_link = get_element(text='Add extra Storage')
114 click_link(add_extra_storage_link)
115
116def set_storage_quantity(quantity):
117 """Set the storage quantity to buy.
118
119 Keyword arguments:
120 quantity -- The quantity to buy.
121
122 """
123 write_textfield('qty', str(quantity))
124
125def _select_extra_storage_montly():
126 set_radio_value('st1')
127
128def buy_extra_storage_yearly(quantity):
129 """Buy the yearly extra storage service."""
130 click_add_extra_storage()
131 set_storage_quantity(quantity)
132 _select_extra_storage_yearly()
133 _click_next_checkout_button()
134
135def _select_extra_storage_yearly():
136 set_radio_value('st2')
98137
99def assert_storage(quantity):138def assert_storage(quantity):
100 """Asert the storage quantity selected and its space and price. 139 """Asert the storage quantity selected and its space and price.
@@ -117,27 +156,3 @@
117def decrease_storage_quantity():156def decrease_storage_quantity():
118 """Click the button that decreases the storage quantity to buy."""157 """Click the button that decreases the storage quantity to buy."""
119 click_button('minus_qty')158 click_button('minus_qty')
120
121def set_storage_quantity(quantity):
122 """Set the storage quantity to buy.
123
124 Keyword arguments:
125 quantity -- The quantity to buy.
126
127 """
128 write_textfield('qty', str(quantity))
129
130def buy_extra_storage_monthly():
131 """Buy the monthly extra storage service."""
132 set_radio_value('st1')
133 buy_extra_storage()
134
135def buy_extra_storage_yearly():
136 """Buy the yearly extra storage service."""
137 set_radio_value('st2')
138 buy_extra_storage()
139
140def buy_extra_storage():
141 """Click the button to buy extra storage."""
142 click_button(get_elements(css_class='buy-now',
143 text='Buy now and go to checkout')[1])

Subscribers

People subscribed via source and target branches