Merge lp:~vila/ubuntuone-testing/trunk into lp:ubuntuone-testing

Proposed by Vincent Ladeuil
Status: Rejected
Rejected by: Leo Arias
Proposed branch: lp:~vila/ubuntuone-testing/trunk
Merge into: lp:ubuntuone-testing
Diff against target: 294 lines (+79/-29)
9 files modified
.bzrignore (+1/-1)
EXPECTED_FAILURES (+32/-0)
ubuntuone/web/tests/sst/account/u1weba001_accountdetails.py (+15/-8)
ubuntuone/web/tests/sst/shared/actions/account.py (+9/-1)
ubuntuone/web/tests/sst/shared/actions/contacts.py (+1/-1)
ubuntuone/web/tests/sst/shared/actions/photos.py (+7/-7)
ubuntuone/web/tests/sst/shared/actions/privacy_policy.py (+3/-2)
ubuntuone/web/tests/sst/shared/actions/services.py (+8/-6)
ubuntuone/web/tests/sst/shared/data/environment.py (+3/-3)
To merge this branch: bzr merge lp:~vila/ubuntuone-testing/trunk
Reviewer Review Type Date Requested Status
Ubuntu One hackers Pending
Review via email: mp+133420@code.launchpad.net

Commit message

Fix some tests after running against edge (6401)

Description of the change

This fixes issues encountered while running 'make test' with a config file pointing at the edge server.

Mostly there were cosmetic changes that requires some fixes to the tests (reminding me that we're mixing functional testing and design testing in our acceptance tests).

The -/+ buttons are currently missing on edge (and staging) in the /services/add-storage page, I've left the the mp url as a comment in the relevant tests (we probably need a better way to track that kind of bug with a pendig fix that will pass later).

I also fixed a couple of typos in the sso urls.

With these fixes in place, we went from:

 Ran 48 tests in 496.000s FAILED (failures=17, errors=1, skipped=12)

to

 Ran 48 tests in 935.033s FAILED (failures=12, errors=1, skipped=12)

The remaining failures are:

u1webf004_downloadfile
u1webp111_orderphotos
u1webp12_openphotostab
u1webp83_addphoto
u1webp107_openphoto

Only canonical employess can access the photos feature on edege, our <email address hidden> test user is only part of u1-hackers.

u1webf003_stoppublishingfile
u1webf002_publishfile
u1webf001_uploadfile
u1webf005_deletefile

I didn't fix these ones as I'm not sure on how do go there, roughly, it seems the tests should refresh the files tab before doing some assertions but it's unclear to me why this refresh wasn't needed before.

u1webse004_choosestorageamount

This one is still failing until the -/+ hidden buttons bug is fixed (see comment in the test for the mp url).

u1webc001_addcontact
u1webc002_editcontact
u1webc003_deletecontact

I suspect something has change in the page design but was unable to find a simple fix for them.

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote :

We moved the tests to ubuntuone-servers

Unmerged revisions

126. By Vincent Ladeuil

Fix some failures after running against edge (6401).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2012-08-08 21:19:44 +0000
3+++ .bzrignore 2012-11-08 08:24:33 +0000
4@@ -7,6 +7,6 @@
5 ubuntuone_testing_log
6 testdata/*.file
7 reports/*
8-sourcecode
9+sourcecode/*
10 results
11 local.cfg
12\ No newline at end of file
13
14=== added file 'EXPECTED_FAILURES'
15--- EXPECTED_FAILURES 1970-01-01 00:00:00 +0000
16+++ EXPECTED_FAILURES 2012-11-08 08:24:33 +0000
17@@ -0,0 +1,32 @@
18+u1webf004_downloadfile
19+u1webp111_orderphotos
20+u1webp12_openphotostab
21+u1webp83_addphoto
22+u1webp107_openphoto
23+
24+Only canonical employess can access the photos feature on edege, our
25+jenkins4@elopio.net test user is only part of u1-hackers.
26+
27+u1webf003_stoppublishingfile
28+u1webf002_publishfile
29+u1webf001_uploadfile
30+u1webf005_deletefile
31+
32+How to fix these ones is unclear: roughly, it seems the tests should refresh
33+the files tab before doing some assertions but it's unclear to me why this
34+refresh wasn't needed before.
35+
36+u1webse004_choosestorageamount
37+
38+Once
39+https://code.launchpad.net/~stephen-stewart/ubuntuone-servers/one-services-strict-error/+merge/133299
40+is deployed, this one is rumored to be fixed.
41+
42+u1webc001_addcontact
43+u1webc002_editcontact
44+u1webc003_deletecontact
45+
46+I suspect something has changed in the page design but was unable to find a
47+simple fix for them.
48+
49+Ran 48 tests in 696.126s FAILED (failures=12, errors=2, skipped=12)
50\ No newline at end of file
51
52=== modified file 'ubuntuone/web/tests/sst/account/u1weba001_accountdetails.py'
53--- ubuntuone/web/tests/sst/account/u1weba001_accountdetails.py 2012-08-08 21:18:53 +0000
54+++ ubuntuone/web/tests/sst/account/u1weba001_accountdetails.py 2012-11-08 08:24:33 +0000
55@@ -20,14 +20,21 @@
56 """
57
58 from sst.actions import *
59-import actions.setup as setup_actions
60-import actions.account as account_actions
61-from _passwords import full_name, email
62-from config import environment
63+from actions import (
64+ account,
65+ setup,
66+)
67+from config import (
68+ schema,
69+ environment,
70+)
71
72-setup_actions.setup()
73-account_actions.open()
74-account_actions.assert_account_details(full_name, email)
75-account_actions.click_edit_account_details()
76+setup.setup()
77+account.open()
78+config_values = schema.glue.schema_parser.values('DefaultUser')
79+full_name = config_values.get('full_name')
80+email = config_values.get('email_address')
81+account.assert_account_details(full_name, email)
82+account.click_edit_account_details()
83 sso_url = environment.get_environment().sso_url
84 assert_url(sso_url)
85
86=== modified file 'ubuntuone/web/tests/sst/shared/actions/account.py'
87--- ubuntuone/web/tests/sst/shared/actions/account.py 2011-12-09 18:19:11 +0000
88+++ ubuntuone/web/tests/sst/shared/actions/account.py 2012-11-08 08:24:33 +0000
89@@ -19,33 +19,41 @@
90 from sst.actions import *
91 import actions.header as header_actions
92
93+
94 def open():
95 header_actions.open_my_account()
96 assert_page_title(), 'My account should be opened'
97
98+
99 def assert_page_title():
100 assert_title(u'Ubuntu One : Your Account')
101
102+
103 def assert_account_details(full_name, email):
104 _assert_name(full_name)
105 _assert_email(email)
106 _assert_password('********')
107
108+
109 def _assert_name(full_name):
110 name_element = _get_user_details_data_elements()[0]
111 assert_text(name_element, full_name)
112
113+
114 def _assert_email(email):
115 email_element = _get_user_details_data_elements()[1]
116 assert_text(email_element, email)
117
118+
119 def _assert_password(password):
120 password_element = _get_user_details_data_elements()[2]
121 assert_text(password_element, password)
122
123+
124 def _get_user_details_data_elements():
125 return get_elements_by_css('.user-details dd')
126-
127+
128+
129 def click_edit_account_details():
130 click_link(get_element(text='Edit your account details in Ubuntu Single '
131 'Sign On'))
132
133=== modified file 'ubuntuone/web/tests/sst/shared/actions/contacts.py'
134--- ubuntuone/web/tests/sst/shared/actions/contacts.py 2012-07-12 18:10:29 +0000
135+++ ubuntuone/web/tests/sst/shared/actions/contacts.py 2012-11-08 08:24:33 +0000
136@@ -211,7 +211,7 @@
137 if about_information.spouse_name:
138 write_textfield('personal-spouse_name', about_information.spouse_name)
139 if about_information.wedding_date:
140- write_textfield('personal-wedding_date',
141+ write_textfield('personal-wedding_date',
142 about_information.wedding_date)
143 if about_information.notes:
144 write_textfield('personal-notes', about_information.notes)
145
146=== modified file 'ubuntuone/web/tests/sst/shared/actions/photos.py'
147--- ubuntuone/web/tests/sst/shared/actions/photos.py 2012-08-06 19:52:17 +0000
148+++ ubuntuone/web/tests/sst/shared/actions/photos.py 2012-11-08 08:24:33 +0000
149@@ -52,18 +52,18 @@
150
151
152 def _get_photo_link_in_list(photo_name):
153- return get_element('.photo-list a[data-u1name="%(name)s"]'
154+ return get_element('.photo-list a[data-u1name="%(name)s"]'
155 % {'name': photo_name})
156
157-
158+
159 def _get_photo_links_in_list():
160- return get_elements('.photo-list a[data-u1name]')
161+ return get_elements('.photo-list a[data-u1name]')
162
163
164 def get_photo_id(photo_name):
165 photo_link = _get_photo_link_in_list(photo_name)
166 return photo_link.get_attribute('data-u1nodekey')
167-
168+
169
170 def open_photo(photo_name):
171 photo_element = _get_photo_element_in_list(photo_name)
172@@ -83,7 +83,7 @@
173 elem = photo_link.find_element_by_css_selector('img')
174 elems.append(elem)
175 return elems
176-
177+
178
179 # Gallery view actions.
180 # TODO make sure we are viewing the photo gallery.
181@@ -103,7 +103,7 @@
182 photo_names = [str(elem.get_attribute('data-qa-id')) for elem in elems]
183 return photo_names
184
185-
186+
187 def assert_photo_order_in_gallery(photo_names):
188 names = _get_photo_names_from_gallery()
189 assert_equal(names, list(photo_names))
190@@ -116,7 +116,7 @@
191 def sort_photo_order_oldest_first():
192 set_dropdown_value('photo-order', 'Show oldest photos first')
193
194-
195+
196 def _get_photo_element_in_gallery(photo_id):
197 photo_css_locator = _get_photo_element_css_locator_in_gallery(photo_id)
198 return get_element_by_css(photo_css_locator)
199
200=== modified file 'ubuntuone/web/tests/sst/shared/actions/privacy_policy.py'
201--- ubuntuone/web/tests/sst/shared/actions/privacy_policy.py 2012-08-16 14:39:54 +0000
202+++ ubuntuone/web/tests/sst/shared/actions/privacy_policy.py 2012-11-08 08:24:33 +0000
203@@ -36,12 +36,13 @@
204 assert_page_url()
205 assert_page_title()
206 assert_page_heading1()
207-
208+
209
210 def assert_page_url():
211 base_url = get_base_url()
212 assert_url(base_url + 'privacy/')
213
214+
215 def assert_page_title():
216 assert_title(u'Ubuntu One : Privacy Policy')
217
218@@ -50,4 +51,4 @@
219 # XXX: There are many h1 elements on the page.
220 # See https://bugs.launchpad.net/ubuntuone-servers/+bug/1037584
221 heading1_element = get_element_by_css('header>h1')
222- assert_text(heading1_element, 'Privacy Policy')
223+ assert_text(heading1_element, 'Canonical Privacy Policy')
224
225=== modified file 'ubuntuone/web/tests/sst/shared/actions/services.py'
226--- ubuntuone/web/tests/sst/shared/actions/services.py 2012-07-15 03:02:48 +0000
227+++ ubuntuone/web/tests/sst/shared/actions/services.py 2012-11-08 08:24:33 +0000
228@@ -66,10 +66,10 @@
229 the expected.
230
231 """
232- _assert_music_streaming_heading_text()
233- get_element(css_class='try-free', text='Try for FREE')
234+ _assert_music_streaming_heading_text()
235+ get_element(css_class='six-free', text='6 months FREE')
236 get_element(tag='li', text='Music streaming on your mobile')
237- get_element(tag='li', text='20 GB of Storage for all your data')
238+ get_element(tag='li', text='20GB of Storage for all your data')
239 get_element(tag='li', text='Listen offline')
240 get_element(tag='li', text='$3.99 / month or $39.99 / year')
241
242@@ -85,7 +85,7 @@
243
244 """
245 get_element(tag='h2', text='Storage')
246- get_element(tag='li', text='20 GB')
247+ get_element(tag='li', text='20GB')
248 get_element(tag='li', text='$2.99 / month')
249 get_element(tag='li', text='$29.99 / year')
250
251@@ -138,7 +138,7 @@
252
253
254 def click_add_extra_storage():
255- add_extra_storage_link = get_element(text='Add extra Storage')
256+ add_extra_storage_link = get_element(text='Add Extra Storage')
257 click_link(add_extra_storage_link)
258
259
260@@ -176,7 +176,7 @@
261
262 """
263 assert_text('qty', str(quantity))
264- assert_text('storage-gb', '%sGB' % (quantity * 20))
265+ assert_text('total-storage', '%sGB' % (quantity * 20 + 5))
266 monthly_price = quantity * 2.99
267 assert_text('storage-monthly-price', '$%s' % monthly_price)
268 annual_price = quantity * 29.99
269@@ -185,6 +185,8 @@
270
271 def increase_storage_quantity():
272 """Click the button that increases the storage quantity to buy."""
273+ # -/+ buttons missing on both edge and staging, told beuno
274+ # https://code.launchpad.net/~stephen-stewart/ubuntuone-servers/one-services-strict-error/+merge/133299
275 click_button('plus_qty')
276
277
278
279=== modified file 'ubuntuone/web/tests/sst/shared/data/environment.py'
280--- ubuntuone/web/tests/sst/shared/data/environment.py 2012-09-05 18:34:09 +0000
281+++ ubuntuone/web/tests/sst/shared/data/environment.py 2012-11-08 08:24:33 +0000
282@@ -17,9 +17,9 @@
283 base_urls = {'staging': 'https://staging.one.ubuntu.com/',
284 'edge': 'https://edge.one.ubuntu.com/',
285 'production': 'https://one.ubuntu.com/'}
286-sso_urls = {'staging': 'https://loging.staging.ubuntu.com/',
287- 'edge': 'https://loging.ubuntu.com/',
288- 'production': 'https://loging.ubuntu.com/'}
289+sso_urls = {'staging': 'https://login.staging.ubuntu.com/',
290+ 'edge': 'https://login.ubuntu.com/',
291+ 'production': 'https://login.ubuntu.com/'}
292 files_urls = {'staging': 'https://files.staging.one.ubuntu.com/',
293 'edge': 'https://files.one.ubuntu.com/',
294 'production': 'https://files.one.ubuntu.com/'}

Subscribers

People subscribed via source and target branches