Merge lp:~elopio/ubuntuone-testing/update-h into lp:ubuntuone-testing

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 88
Merged at revision: 78
Proposed branch: lp:~elopio/ubuntuone-testing/update-h
Merge into: lp:ubuntuone-testing
Prerequisite: lp:~elopio/ubuntuone-testing/stabilize-notes
Diff against target: 88 lines (+11/-11)
4 files modified
ubuntuone/web/tests/sst/shared/actions/dashboard.py (+1/-1)
ubuntuone/web/tests/sst/shared/actions/music.py (+1/-1)
ubuntuone/web/tests/sst/shared/actions/services.py (+4/-6)
ubuntuone/web/tests/sst/shared/utils/paymentperiods.py (+5/-3)
To merge this branch: bzr merge lp:~elopio/ubuntuone-testing/update-h
Reviewer Review Type Date Requested Status
Rick McBride (community) Approve
Review via email: mp+91193@code.launchpad.net

Commit message

Updated the locators that used headings.
Updated the plans messages.

Description of the change

Updated the locators that used headings.
Updated the plans messages.

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

+1
also nicely done on the handling of december

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

The prerequisite lp:~elopio/ubuntuone-testing/stabilize-notes has not yet been merged into lp:ubuntuone-testing.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/web/tests/sst/shared/actions/dashboard.py'
2--- ubuntuone/web/tests/sst/shared/actions/dashboard.py 2011-12-13 23:05:13 +0000
3+++ ubuntuone/web/tests/sst/shared/actions/dashboard.py 2012-02-02 01:29:19 +0000
4@@ -37,4 +37,4 @@
5 assert_text(_get_welcome_element(), 'Hi %s! Welcome Back' % user_full_name)
6
7 def _get_welcome_element():
8- return get_element_by_css('header > hgroup > h1')
9+ return get_element_by_css('h1')
10
11=== modified file 'ubuntuone/web/tests/sst/shared/actions/music.py'
12--- ubuntuone/web/tests/sst/shared/actions/music.py 2012-01-25 17:52:50 +0000
13+++ ubuntuone/web/tests/sst/shared/actions/music.py 2012-02-02 01:29:19 +0000
14@@ -102,7 +102,7 @@
15 return song_row_element.get_attribute('data-u1m-songid')
16
17 def assert_player_title(number_of_song, total_songs):
18- player_title_element = get_element_by_css('.player > h1')
19+ player_title_element = get_element_by_css('.player > h2')
20 expected_title = 'Now playing %d of %d songs' \
21 % (number_of_song, total_songs)
22 assert expected_title == player_title_element.text
23
24=== modified file 'ubuntuone/web/tests/sst/shared/actions/services.py'
25--- ubuntuone/web/tests/sst/shared/actions/services.py 2011-12-09 18:19:11 +0000
26+++ ubuntuone/web/tests/sst/shared/actions/services.py 2012-02-02 01:29:19 +0000
27@@ -43,7 +43,7 @@
28
29 def assert_free_service_information():
30 """Assert that the information about the free service is the expected."""
31- get_element(tag='h1', text='Free')
32+ get_element(tag='h2', text='Free')
33 get_element(tag='li', text='File sync across platforms')
34 get_element(tag='li', text='Share folders and files')
35 get_element(tag='li', text='Access on your mobile')
36@@ -53,9 +53,7 @@
37 the expected.
38
39 """
40- # TODO there are two Music Streaming elements. We should use xpath to be
41- # sure that we are on the right section.
42- #get_element(tag='h1', text='Music Streaming')
43+ get_element(tag='h2', text='Music Streaming')
44 get_element(css_class='try-free', text='Try for FREE')
45 get_element(tag='li', text='Music streaming on your mobile')
46 get_element(tag='li', text='20 GB of Storage for all your data')
47@@ -67,14 +65,14 @@
48 expected.
49
50 """
51- get_element(tag='h1', text='Storage')
52+ get_element(tag='h2', text='Storage')
53 get_element(tag='li', text='20 GB')
54 get_element(tag='li', text='$2.99 / month')
55 get_element(tag='li', text='or $29.99 / year')
56
57 def assert_discount_information():
58 """Assert that the yearly discount information is the expected."""
59- get_element(tag='h1', text='Discount')
60+ get_element(tag='h3', text='Discount')
61 get_element(tag='p', text='Two months free on Music Streaming and Storage '
62 'when you sign up for 12 months')
63
64
65=== modified file 'ubuntuone/web/tests/sst/shared/utils/paymentperiods.py'
66--- ubuntuone/web/tests/sst/shared/utils/paymentperiods.py 2011-12-14 00:00:56 +0000
67+++ ubuntuone/web/tests/sst/shared/utils/paymentperiods.py 2012-02-02 01:29:19 +0000
68@@ -20,15 +20,17 @@
69
70 def get_monthly_expiration_date():
71 today = _get_today()
72+ next_month = None
73 if today.month != 12:
74- return today.replace(month=today.month + 1)
75+ next_month = today.replace(month=today.month + 1)
76 else:
77- return today.replace(month=1, year=today.year + 1)
78+ next_month = today.replace(month=1, year=today.year + 1)
79+ return next_month + timedelta(days=1)
80
81 def get_yearly_expiration_date():
82 today = _get_today()
83 expiration_date = today.replace(year = today.year + 1)
84- return expiration_date + timedelta(days=1)
85+ return expiration_date
86
87 def get_trial_expiration_date():
88 today = _get_today()

Subscribers

People subscribed via source and target branches