Merge lp:~elopio/ubuntuone-testing/u1web into lp:~rmcbride/ubuntuone-testing/sst-services-page

Proposed by Leo Arias
Status: Merged
Merged at revision: 33
Proposed branch: lp:~elopio/ubuntuone-testing/u1web
Merge into: lp:~rmcbride/ubuntuone-testing/sst-services-page
Diff against target: 331 lines (+244/-2)
9 files modified
qa/selenium/services/u1webp-001.py (+47/-0)
qa/selenium/services/u1webp-002.py (+46/-0)
qa/selenium/services/u1webp-003.py (+34/-0)
qa/selenium/services/u1webse-001.py (+22/-0)
qa/selenium/services/u1webse-002.py (+13/-0)
qa/selenium/services/u1webse-003.py (+15/-1)
qa/selenium/services/u1webse-004.py (+29/-0)
qa/selenium/services/u1webse-005.py (+19/-1)
qa/selenium/services/u1webse-006.py (+19/-0)
To merge this branch: bzr merge lp:~elopio/ubuntuone-testing/u1web
Reviewer Review Type Date Requested Status
Rick McBride Approve
Review via email: mp+75300@code.launchpad.net

Commit message

Added the actions for the Services tests: u1webse-001 to u1webse-006.
Added the actions for the Payments tests: u1webp-001 to u1webse-003.

Description of the change

Completed the actions for the services tests.

To post a comment you must log in.
Revision history for this message
Rick McBride (rmcbride) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'qa/selenium/services/u1webp-001.py'
--- qa/selenium/services/u1webp-001.py 1970-01-01 00:00:00 +0000
+++ qa/selenium/services/u1webp-001.py 2011-09-14 05:18:46 +0000
@@ -0,0 +1,47 @@
1from sst.actions import *
2from additional._actions import *
3try:
4 from _passwords import username, password
5except:
6 print "try adding a _passwords.py file if you expect this to work ;)"
7from additional.config import base_url
8from datetime import date
9
10set_base_url(base_url)
11login(username, password)
12title_is(u'Ubuntu One : Dashboard')
13goto('/services/')
14title_is(u'Ubuntu One : Services')
15radio_select('ms2')
16button_click(get_elements(css_class='buy-now',
17 text='Buy now and go to checkout')[0])
18title_is(u'Ubuntu One : Checkout')
19textfield_write('id_street', 'Test Street')
20textfield_write('id_city', 'Test City')
21textfield_write('id_state', 'Test Region')
22textfield_write('id_postal', '12345')
23set_select('id_country', 'United States')
24set_select('id_card_type', 'Visa')
25textfield_write('id_card_holder', 'Test name')
26textfield_write('id_card_number', '4111111111111111')
27textfield_write('id_card_ccv', '123')
28set_select('id_card_expiration_0', '10')
29set_select('id_card_expiration_1', '2015')
30button_click(get_element(css_class='cta', value='Purchase'))
31title_is(u'Ubuntu One : Confirm Payment Details')
32link_click(get_element(css_class='cta', href='confirmed'))
33title_is(u'Ubuntu One : Confirm Payment Details')
34get_element(tag='h1', text='Payment Processed')
35today = date.today()
36next_month = today.replace(month = today.month + 1)
37#get_element(tag='dt', css_class='purchase_details'
38# text='Expires: %(next_month)s'
39# % {'next_month': next_month.strftime('%B %-d, %Y')})
40get_element(tag='p', css_class='explanation',
41 text='Your card will automatically be billed $39.99 annually')
42get_element(tag='dd', text='AUTHORISED')
43link_click(get_element(tag='a', text='View your account'))
44get_element(tag='span', text='29 trial days left')
45get_element(tag='p', text='You are subscribed yearly')
46get_element(tag='span', text='See my subscription')
47get_element(tag='span', text='20GB with Music Streaming')
048
=== added file 'qa/selenium/services/u1webp-002.py'
--- qa/selenium/services/u1webp-002.py 1970-01-01 00:00:00 +0000
+++ qa/selenium/services/u1webp-002.py 2011-09-14 05:18:46 +0000
@@ -0,0 +1,46 @@
1from sst.actions import *
2from additional._actions import *
3try:
4 from _passwords import username, password
5except:
6 print "try adding a _passwords.py file if you expect this to work ;)"
7from additional.config import base_url
8from datetime import date
9
10set_base_url(base_url)
11login(username, password)
12title_is(u'Ubuntu One : Dashboard')
13goto('/services/')
14title_is(u'Ubuntu One : Services')
15textfield_write('qty', '5')
16radio_select('st1')
17button_click(get_elements(css_class='buy-now',
18 text='Buy now and go to checkout')[1])
19title_is(u'Ubuntu One : Checkout')
20textfield_write('id_street', 'Test Street')
21textfield_write('id_city', 'Test City')
22textfield_write('id_state', 'Test Region')
23textfield_write('id_postal', '12345')
24set_select('id_country', 'United States')
25set_select('id_card_type', 'American Express')
26textfield_write('id_card_holder', 'Test name')
27textfield_write('id_card_number', '343434343434343')
28textfield_write('id_card_ccv', '123')
29set_select('id_card_expiration_0', '10')
30set_select('id_card_expiration_1', '2015')
31button_click(get_element(css_class='cta', value='Purchase'))
32title_is(u'Ubuntu One : Confirm Payment Details')
33link_click(get_element(css_class='cta', href='confirmed'))
34title_is(u'Ubuntu One : Confirm Payment Details')
35get_element(tag='h1', text='Payment Processed')
36today = date.today()
37next_month = today.replace(month = today.month + 1)
38#get_element(tag='dt', css_class='purchase_details'
39# text='Expires: %(next_month)s'
40# % {'next_month': next_month.strftime('%B %-d, %Y')})
41get_element(tag='p', css_class='explanation',
42 text='Your card will automatically be billed $14.95 monthly')
43get_element(tag='dd', text='AUTHORISED')
44link_click(get_element(tag='a', text='View your account'))
45get_element(tag='span', text='5GB with Ubuntu One Free')
46get_element(tag='span', text='100GB from storage add-on')
047
=== added file 'qa/selenium/services/u1webp-003.py'
--- qa/selenium/services/u1webp-003.py 1970-01-01 00:00:00 +0000
+++ qa/selenium/services/u1webp-003.py 2011-09-14 05:18:46 +0000
@@ -0,0 +1,34 @@
1from sst.actions import *
2from additional._actions import *
3try:
4 from _passwords import username, password
5except:
6 print "try adding a _passwords.py file if you expect this to work ;)"
7from additional.config import base_url
8
9set_base_url(base_url)
10login(username, password)
11title_is(u'Ubuntu One : Dashboard')
12goto('/services/')
13title_is(u'Ubuntu One : Services')
14radio_select('ms2')
15button_click(get_elements(css_class='buy-now',
16 text='Buy now and go to checkout')[0])
17title_is(u'Ubuntu One : Checkout')
18textfield_write('id_street', 'Test Street')
19textfield_write('id_city', 'Test City')
20textfield_write('id_state', 'Test Region')
21textfield_write('id_postal', '12345')
22set_select('id_country', 'United States')
23set_select('id_card_type', 'Visa')
24textfield_write('id_card_holder', 'REFUSED')
25textfield_write('id_card_number', '4111111111111111')
26textfield_write('id_card_ccv', '123')
27set_select('id_card_expiration_0', '10')
28set_select('id_card_expiration_1', '2015')
29button_click(get_element(css_class='cta', value='Purchase'))
30title_is(u'Ubuntu One : Confirm Payment Details')
31link_click(get_element(css_class='cta', href='confirmed'))
32title_is(u'Ubuntu One : Confirm Payment Details')
33get_element(tag='h1', text='Your Payment Failed')
34get_element(tag='a', text='fill out the details here', href='/payment/')
035
=== modified file 'qa/selenium/services/u1webse-001.py'
--- qa/selenium/services/u1webse-001.py 2011-09-02 19:47:18 +0000
+++ qa/selenium/services/u1webse-001.py 2011-09-14 05:18:46 +0000
@@ -8,3 +8,25 @@
88
9set_base_url(base_url)9set_base_url(base_url)
10login(username, password)10login(username, password)
11title_is(u'Ubuntu One : Dashboard')
12goto('/services/')
13get_element(tag='h1', text='Free')
14get_element(tag='li', text='File sync across platforms')
15get_element(tag='li', text='Share folders and files')
16get_element(tag='li', text='Access on your mobile')
17# TODO there are two Music Streaming elements. We should use xpath to be
18# sure that we are on the right section.
19#get_element(tag='h1', text='Music Streaming')
20get_element(css_class='try-free', text='Try for FREE')
21get_element(tag='li', text='Music streaming on your mobile')
22get_element(tag='li', text='20 GB of Storage built in')
23get_element(tag='li', text='Listen offline on Android')
24get_element(tag='li',
25 text='$3.99 / month or $39.99 / year')
26get_element(tag='h1', text='Storage')
27get_element(tag='li', text='20 GB')
28get_element(tag='li', text='$2.99 / month')
29get_element(tag='li', text='or $29.99 / year')
30get_element(tag='h1', text='Discount')
31get_element(tag='p', text='Two months free on Music Streaming and Storage ' \
32 'when you sign up for 12 months')
1133
=== modified file 'qa/selenium/services/u1webse-002.py'
--- qa/selenium/services/u1webse-002.py 2011-09-06 19:07:52 +0000
+++ qa/selenium/services/u1webse-002.py 2011-09-14 05:18:46 +0000
@@ -11,3 +11,16 @@
11title_is(u'Ubuntu One : Dashboard')11title_is(u'Ubuntu One : Dashboard')
12goto('/services/')12goto('/services/')
13title_is(u'Ubuntu One : Services')13title_is(u'Ubuntu One : Services')
14radio_select('ms1')
15button_click(get_elements(css_class='buy-now',
16 text='Buy now and go to checkout')[0])
17title_is(u'Ubuntu One : Checkout')
18get_element(tag='h1', text='New Subscription')
19get_element(css_class='price', text='$3.99')
20get_element(tag='span', css_class='price', text='$3.99')
21today = date.today()
22next_month = today.replace(month = today.month + 1)
23get_element(tag='p', text='This is a trial subscription which will expire ' \
24 '%(next_month)s afterwhich your card ' \
25 'will automatically be billed $3.99 monthly'
26 % {'next_month': next_month.strftime('%B %-d, %Y')})
1427
=== modified file 'qa/selenium/services/u1webse-003.py'
--- qa/selenium/services/u1webse-003.py 2011-09-06 19:07:52 +0000
+++ qa/selenium/services/u1webse-003.py 2011-09-14 05:18:46 +0000
@@ -4,10 +4,24 @@
4 from _passwords import username, password4 from _passwords import username, password
5except:5except:
6 print "try adding a _passwords.py file if you expect this to work ;)"6 print "try adding a _passwords.py file if you expect this to work ;)"
7from additional.config import base_url 7from additional.config import base_url
8from datetime import date
89
9set_base_url(base_url)10set_base_url(base_url)
10login(username, password)11login(username, password)
11title_is(u'Ubuntu One : Dashboard')12title_is(u'Ubuntu One : Dashboard')
12goto('/services/')13goto('/services/')
13title_is(u'Ubuntu One : Services')14title_is(u'Ubuntu One : Services')
15radio_select('ms2')
16button_click(get_elements(css_class='buy-now',
17 text='Buy now and go to checkout')[0])
18title_is(u'Ubuntu One : Checkout')
19get_element(tag='h1', text='New Subscription')
20get_element(css_class='price', text='$39.99')
21get_element(tag='span', css_class='price', text='$39.99')
22today = date.today()
23next_month = today.replace(month = today.month + 1)
24get_element(tag='p', text='This is a trial subscription which will expire ' \
25 '%(next_month)s afterwhich your card ' \
26 'will automatically be billed $39.99 annually'
27 % {'next_month': next_month.strftime('%B %-d, %Y')})
1428
=== modified file 'qa/selenium/services/u1webse-004.py'
--- qa/selenium/services/u1webse-004.py 2011-09-06 19:07:52 +0000
+++ qa/selenium/services/u1webse-004.py 2011-09-14 05:18:46 +0000
@@ -6,8 +6,37 @@
6 print "try adding a _passwords.py file if you expect this to work ;)"6 print "try adding a _passwords.py file if you expect this to work ;)"
7from additional.config import base_url 7from additional.config import base_url
88
9def assert_storage(quantity):
10 """
11 Asert the storage quantity selected and its space and price.
12
13 Keyword arguments:
14 quantity -- The expected storage quantity.
15 """
16 text_is('qty', str(quantity))
17 text_is('storage-gb', '%sGB' % (quantity * 20))
18 monthly_price = quantity * 2.99
19 text_is('storage-monthly-price', '$%s' % monthly_price)
20 annual_price = quantity * 29.99
21 text_is('storage-annual-price', '$%s' % annual_price)
22
23
9set_base_url(base_url)24set_base_url(base_url)
10login(username, password)25login(username, password)
11title_is(u'Ubuntu One : Dashboard')26title_is(u'Ubuntu One : Dashboard')
12goto('/services/')27goto('/services/')
13title_is(u'Ubuntu One : Services')28title_is(u'Ubuntu One : Services')
29assert_storage(1)
30button_click('plus_qty')
31assert_storage(2)
32button_click('minus_qty')
33for quantity in range(2, 11):
34 button_click('plus_qty')
35 assert_storage(quantity)
36for quantity in range(9, 4, -1):
37 button_click('minus_qty')
38 assert_storage(quantity)
39textfield_write('qty', '25')
40# Move the focus out of the textfield.
41click('storage-gb')
42assert_storage(25)
1443
=== modified file 'qa/selenium/services/u1webse-005.py'
--- qa/selenium/services/u1webse-005.py 2011-09-06 19:07:52 +0000
+++ qa/selenium/services/u1webse-005.py 2011-09-14 05:18:46 +0000
@@ -4,10 +4,28 @@
4 from _passwords import username, password4 from _passwords import username, password
5except:5except:
6 print "try adding a _passwords.py file if you expect this to work ;)"6 print "try adding a _passwords.py file if you expect this to work ;)"
7from additional.config import base_url 7from additional.config import base_url
8from datetime import date
89
9set_base_url(base_url)10set_base_url(base_url)
10login(username, password)11login(username, password)
11title_is(u'Ubuntu One : Dashboard')12title_is(u'Ubuntu One : Dashboard')
12goto('/services/')13goto('/services/')
13title_is(u'Ubuntu One : Services')14title_is(u'Ubuntu One : Services')
15textfield_write('qty', '5')
16radio_select('st1')
17button_click(get_elements(css_class='buy-now',
18 text='Buy now and go to checkout')[1])
19title_is(u'Ubuntu One : Checkout')
20get_element(tag='h1', text='Subscription Change')
21get_element(tag='p', text='5 x 20-Pack with 20 GB (monthly)')
22get_element(tag='strong', text='Monthly')
23get_element(css_class='price', text='$2.99')
24get_element(tag='span', css_class='price', text='$14.95')
25today = date.today()
26next_month = today.replace(month = today.month + 1)
27get_element(tag='p', text='This payment will cover the period from ' \
28 '%(today)s to %(next_month)s afterwhich your card ' \
29 'will automatically be billed $14.95 monthly'
30 % {'today': today.strftime('%B %-d, %Y'),
31 'next_month': next_month.strftime('%B %-d, %Y')})
1432
=== modified file 'qa/selenium/services/u1webse-006.py'
--- qa/selenium/services/u1webse-006.py 2011-09-06 19:07:52 +0000
+++ qa/selenium/services/u1webse-006.py 2011-09-14 05:18:46 +0000
@@ -5,9 +5,28 @@
5except:5except:
6 print "try adding a _passwords.py file if you expect this to work ;)"6 print "try adding a _passwords.py file if you expect this to work ;)"
7from additional.config import base_url 7from additional.config import base_url
8from datetime import date
89
9set_base_url(base_url)10set_base_url(base_url)
10login(username, password)11login(username, password)
11title_is(u'Ubuntu One : Dashboard')12title_is(u'Ubuntu One : Dashboard')
12goto('/services/')13goto('/services/')
13title_is(u'Ubuntu One : Services')14title_is(u'Ubuntu One : Services')
15
16textfield_write('qty', '5')
17radio_select('st2')
18button_click(get_elements(css_class='buy-now',
19 text='Buy now and go to checkout')[1])
20title_is(u'Ubuntu One : Checkout')
21get_element(tag='h1', text='Subscription Change')
22get_element(tag='p', text='5 x 20-Pack with 20 GB (yearly)')
23get_element(tag='strong', text='Yearly')
24get_element(css_class='price', text='$29.99')
25get_element(tag='span', css_class='price', text='$149.95')
26today = date.today()
27next_year = today.replace(year = today.year + 1, day = today.day + 1)
28get_element(tag='p', text='This payment will cover the period from ' \
29 '%(today)s to %(next_year)s afterwhich your card ' \
30 'will automatically be billed $149.95 annually' \
31 % {'today': today.strftime('%B %-d, %Y'),
32 'next_year': next_year.strftime('%B %-d, %Y')})

Subscribers

People subscribed via source and target branches

to all changes: