Merge lp:~elopio/ubuntuone-testing/api-refactor into lp:ubuntuone-testing

Proposed by Leo Arias
Status: Merged
Approved by: Rick McBride
Approved revision: 68
Merged at revision: 62
Proposed branch: lp:~elopio/ubuntuone-testing/api-refactor
Merge into: lp:ubuntuone-testing
Diff against target: 1362 lines (+245/-244)
38 files modified
config-manager.txt (+1/-1)
ubuntuone/web/tests/sst/account/u1weba001_accountdetails.py (+1/-1)
ubuntuone/web/tests/sst/files/u1webf002_publishfile.py (+1/-1)
ubuntuone/web/tests/sst/files/u1webf003_stoppublishingfile.py (+2/-2)
ubuntuone/web/tests/sst/navigation/u1webn001_maintabs.py (+2/-1)
ubuntuone/web/tests/sst/payments/u1webp001_paymusicstreaming.py (+1/-1)
ubuntuone/web/tests/sst/payments/u1webp002_payadditionalstorage.py (+1/-1)
ubuntuone/web/tests/sst/payments/u1webp003_paywithrefusedcard.py (+2/-2)
ubuntuone/web/tests/sst/services/u1webse002_musicstreamingmonthly.py (+1/-1)
ubuntuone/web/tests/sst/services/u1webse003_musicstreamingannually.py (+1/-1)
ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py (+1/-1)
ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py (+1/-1)
ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py (+1/-1)
ubuntuone/web/tests/sst/session/u1webs002_login.py (+1/-1)
ubuntuone/web/tests/sst/shared/actions/account.py (+7/-7)
ubuntuone/web/tests/sst/shared/actions/contacts.py (+52/-52)
ubuntuone/web/tests/sst/shared/actions/dashboard.py (+5/-5)
ubuntuone/web/tests/sst/shared/actions/files.py (+31/-31)
ubuntuone/web/tests/sst/shared/actions/header.py (+4/-4)
ubuntuone/web/tests/sst/shared/actions/loading.py (+1/-1)
ubuntuone/web/tests/sst/shared/actions/music.py (+17/-17)
ubuntuone/web/tests/sst/shared/actions/notes.py (+12/-12)
ubuntuone/web/tests/sst/shared/actions/payment.py (+16/-16)
ubuntuone/web/tests/sst/shared/actions/payment_confirmed.py (+5/-5)
ubuntuone/web/tests/sst/shared/actions/services.py (+19/-19)
ubuntuone/web/tests/sst/shared/actions/setup.py (+3/-3)
ubuntuone/web/tests/sst/shared/actions/sso.py (+21/-21)
ubuntuone/web/tests/sst/smoketest/blogpage.py (+5/-5)
ubuntuone/web/tests/sst/smoketest/contactspage.py (+2/-2)
ubuntuone/web/tests/sst/smoketest/filespage.py (+3/-3)
ubuntuone/web/tests/sst/smoketest/freeplan.py (+3/-3)
ubuntuone/web/tests/sst/smoketest/helppage.py (+4/-4)
ubuntuone/web/tests/sst/smoketest/joinpage.py (+4/-4)
ubuntuone/web/tests/sst/smoketest/mainpage.py (+4/-4)
ubuntuone/web/tests/sst/smoketest/notes.txt (+2/-2)
ubuntuone/web/tests/sst/smoketest/notespage.py (+2/-2)
ubuntuone/web/tests/sst/smoketest/services.py (+2/-2)
ubuntuone/web/tests/sst/smoketest/streamingplan.py (+4/-4)
To merge this branch: bzr merge lp:~elopio/ubuntuone-testing/api-refactor
Reviewer Review Type Date Requested Status
Rick McBride (community) Approve
Review via email: mp+85184@code.launchpad.net

Commit message

Bumped to new version of SST and did the whole renaming refactor.

Description of the change

Bumped to new version of SST and did the whole renaming refactor.

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

cool

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config-manager.txt'
2--- config-manager.txt 2011-10-19 19:04:38 +0000
3+++ config-manager.txt 2011-12-09 19:54:29 +0000
4@@ -4,4 +4,4 @@
5 # make clean-sourcedeps update-sourcedeps
6 #
7
8-./sourcecode/selenium-simple-test bzr+ssh://bazaar.launchpad.net/~canonical-isd-qa/selenium-simple-test/trunk;revno=205
9+./sourcecode/selenium-simple-test bzr+ssh://bazaar.launchpad.net/~canonical-isd-qa/selenium-simple-test/trunk;revno=222
10
11=== modified file 'ubuntuone/web/tests/sst/account/u1weba001_accountdetails.py'
12--- ubuntuone/web/tests/sst/account/u1weba001_accountdetails.py 2011-11-15 07:18:27 +0000
13+++ ubuntuone/web/tests/sst/account/u1weba001_accountdetails.py 2011-12-09 19:54:29 +0000
14@@ -28,4 +28,4 @@
15 account_actions.open()
16 account_actions.assert_account_details(full_name, email)
17 account_actions.click_edit_account_details()
18-url_is('https://login.ubuntu.com/')
19+assert_url('https://login.ubuntu.com/')
20
21=== modified file 'ubuntuone/web/tests/sst/files/u1webf002_publishfile.py'
22--- ubuntuone/web/tests/sst/files/u1webf002_publishfile.py 2011-11-17 21:59:58 +0000
23+++ ubuntuone/web/tests/sst/files/u1webf002_publishfile.py 2011-12-09 19:54:29 +0000
24@@ -45,4 +45,4 @@
25 files_actions.publish_file(file_name)
26 files_actions.assert_file_published(file_name)
27 file_url = files_actions.go_to_public_url(file_name)
28-text_is(get_element(tag='body'), file_contents)
29+assert_text(get_element(tag='body'), file_contents)
30
31=== modified file 'ubuntuone/web/tests/sst/files/u1webf003_stoppublishingfile.py'
32--- ubuntuone/web/tests/sst/files/u1webf003_stoppublishingfile.py 2011-11-17 21:59:58 +0000
33+++ ubuntuone/web/tests/sst/files/u1webf003_stoppublishingfile.py 2011-12-09 19:54:29 +0000
34@@ -48,5 +48,5 @@
35 files_actions.stop_publishing_file(file_name)
36 files_actions.assert_file_not_published(file_name)
37 set_base_url(base_url)
38-goto(path)
39-text_is(get_element(tag='body'), 'Could not locate object')
40+go_to(path)
41+assert_text(get_element(tag='body'), 'Could not locate object')
42
43=== modified file 'ubuntuone/web/tests/sst/navigation/u1webn001_maintabs.py'
44--- ubuntuone/web/tests/sst/navigation/u1webn001_maintabs.py 2011-11-24 05:13:14 +0000
45+++ ubuntuone/web/tests/sst/navigation/u1webn001_maintabs.py 2011-12-09 19:54:29 +0000
46@@ -23,10 +23,11 @@
47 import actions.setup as setup_actions
48 import actions.dashboard as dashboard_actions
49 import actions.files as files_actions
50+import actions.notes as notes_actions
51 import actions.contacts as contacts_actions
52
53 setup_actions.setup()
54-dashboard_actions.assert_title()
55+dashboard_actions.assert_page_title()
56 files_actions.open()
57 notes_actions.open()
58 contacts_actions.open()
59
60=== modified file 'ubuntuone/web/tests/sst/payments/u1webp001_paymusicstreaming.py'
61--- ubuntuone/web/tests/sst/payments/u1webp001_paymusicstreaming.py 2011-11-24 04:58:16 +0000
62+++ ubuntuone/web/tests/sst/payments/u1webp001_paymusicstreaming.py 2011-12-09 19:54:29 +0000
63@@ -33,7 +33,7 @@
64 setup_actions.setup(new_user=True)
65 services_actions.open()
66 services_actions.buy_music_streaming_yearly()
67-payment_actions.assert_title()
68+payment_actions.assert_page_title()
69 payment_actions.place_order_with_valid_card()
70 payment_actions.confirm_payment_details()
71 payment_confirmed_actions.assert_processed_payment('annually', 1, 39.99,
72
73=== modified file 'ubuntuone/web/tests/sst/payments/u1webp002_payadditionalstorage.py'
74--- ubuntuone/web/tests/sst/payments/u1webp002_payadditionalstorage.py 2011-12-02 15:01:13 +0000
75+++ ubuntuone/web/tests/sst/payments/u1webp002_payadditionalstorage.py 2011-12-09 19:54:29 +0000
76@@ -32,7 +32,7 @@
77 setup_actions.setup(new_user=True)
78 services_actions.open()
79 services_actions.buy_extra_storage()
80-payment_actions.assert_title()
81+payment_actions.assert_page_title()
82 payment_actions.place_order_with_valid_card()
83 payment_actions.confirm_payment_details()
84 payment_confirmed_actions.assert_processed_payment('annually', 29.99, 29.99)
85
86=== modified file 'ubuntuone/web/tests/sst/payments/u1webp003_paywithrefusedcard.py'
87--- ubuntuone/web/tests/sst/payments/u1webp003_paywithrefusedcard.py 2011-11-24 04:58:16 +0000
88+++ ubuntuone/web/tests/sst/payments/u1webp003_paywithrefusedcard.py 2011-12-09 19:54:29 +0000
89@@ -32,8 +32,8 @@
90 setup_actions.setup()
91 services_actions.open()
92 services_actions.buy_music_streaming()
93-payment_actions.assert_title()
94+payment_actions.assert_page_title()
95 payment_actions.place_order_with_refused_card()
96 payment_actions.confirm_payment_details()
97-payment_confirmed_actions.assert_title()
98+payment_confirmed_actions.assert_page_title()
99 payment_confirmed_actions.assert_failed_payment()
100
101=== modified file 'ubuntuone/web/tests/sst/services/u1webse002_musicstreamingmonthly.py'
102--- ubuntuone/web/tests/sst/services/u1webse002_musicstreamingmonthly.py 2011-09-22 06:27:21 +0000
103+++ ubuntuone/web/tests/sst/services/u1webse002_musicstreamingmonthly.py 2011-12-09 19:54:29 +0000
104@@ -28,5 +28,5 @@
105 setup_actions.setup()
106 services_actions.open()
107 services_actions.buy_music_streaming_monthly()
108-payment_actions.assert_title()
109+payment_actions.assert_page_title()
110 payment_actions.assert_monthly_music_streaming_subscription()
111
112=== modified file 'ubuntuone/web/tests/sst/services/u1webse003_musicstreamingannually.py'
113--- ubuntuone/web/tests/sst/services/u1webse003_musicstreamingannually.py 2011-09-22 06:27:21 +0000
114+++ ubuntuone/web/tests/sst/services/u1webse003_musicstreamingannually.py 2011-12-09 19:54:29 +0000
115@@ -28,5 +28,5 @@
116 setup_actions.setup()
117 services_actions.open()
118 services_actions.buy_music_streaming_yearly()
119-payment_actions.assert_title()
120+payment_actions.assert_page_title()
121 payment_actions.assert_annually_music_streaming_subscription()
122
123=== modified file 'ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py'
124--- ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py 2011-11-15 19:11:36 +0000
125+++ ubuntuone/web/tests/sst/services/u1webse004_choosestorageamount.py 2011-12-09 19:54:29 +0000
126@@ -38,6 +38,6 @@
127 services_actions.assert_storage(quantity)
128 services_actions.set_storage_quantity('25')
129 # Move the focus out of the textfield.
130-element_click('storage-gb')
131+click_element('storage-gb')
132 sleep(1)
133 services_actions.assert_storage(25)
134
135=== modified file 'ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py'
136--- ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py 2011-09-22 06:27:21 +0000
137+++ ubuntuone/web/tests/sst/services/u1webse005_addmonthlystorage.py 2011-12-09 19:54:29 +0000
138@@ -29,5 +29,5 @@
139 services_actions.open()
140 services_actions.set_storage_quantity(5)
141 services_actions.buy_extra_storage_monthly()
142-payment_actions.assert_title()
143+payment_actions.assert_page_title()
144 payment_actions.assert_monthly_extra_storage_subscription(5)
145
146=== modified file 'ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py'
147--- ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py 2011-09-22 06:27:21 +0000
148+++ ubuntuone/web/tests/sst/services/u1webse006_addannuallystorage.py 2011-12-09 19:54:29 +0000
149@@ -29,5 +29,5 @@
150 services_actions.open()
151 services_actions.set_storage_quantity(5)
152 services_actions.buy_extra_storage_yearly()
153-payment_actions.assert_title()
154+payment_actions.assert_page_title()
155 payment_actions.assert_annually_extra_storage_subscription(5)
156
157=== modified file 'ubuntuone/web/tests/sst/session/u1webs002_login.py'
158--- ubuntuone/web/tests/sst/session/u1webs002_login.py 2011-11-15 07:18:27 +0000
159+++ ubuntuone/web/tests/sst/session/u1webs002_login.py 2011-12-09 19:54:29 +0000
160@@ -26,6 +26,6 @@
161 from _passwords import full_name
162
163 setup_actions.setup(new_user=False)
164-dashboard_actions.assert_title()
165+dashboard_actions.assert_page_title()
166 header_actions.assert_login(full_name)
167 dashboard_actions.assert_welcome_message(full_name)
168
169=== modified file 'ubuntuone/web/tests/sst/shared/actions/account.py'
170--- ubuntuone/web/tests/sst/shared/actions/account.py 2011-11-15 07:18:27 +0000
171+++ ubuntuone/web/tests/sst/shared/actions/account.py 2011-12-09 19:54:29 +0000
172@@ -21,10 +21,10 @@
173
174 def open():
175 header_actions.open_my_account()
176- assert_title(), 'My account should be opened'
177+ assert_page_title(), 'My account should be opened'
178
179-def assert_title():
180- title_is(u'Ubuntu One : Your Account')
181+def assert_page_title():
182+ assert_title(u'Ubuntu One : Your Account')
183
184 def assert_account_details(full_name, email):
185 _assert_name(full_name)
186@@ -33,19 +33,19 @@
187
188 def _assert_name(full_name):
189 name_element = _get_user_details_data_elements()[0]
190- text_is(name_element, full_name)
191+ assert_text(name_element, full_name)
192
193 def _assert_email(email):
194 email_element = _get_user_details_data_elements()[1]
195- text_is(email_element, email)
196+ assert_text(email_element, email)
197
198 def _assert_password(password):
199 password_element = _get_user_details_data_elements()[2]
200- text_is(password_element, password)
201+ assert_text(password_element, password)
202
203 def _get_user_details_data_elements():
204 return get_elements_by_css('.user-details dd')
205
206 def click_edit_account_details():
207- link_click(get_element(text='Edit your account details in Ubuntu Single '
208+ click_link(get_element(text='Edit your account details in Ubuntu Single '
209 'Sign On'))
210
211=== modified file 'ubuntuone/web/tests/sst/shared/actions/contacts.py'
212--- ubuntuone/web/tests/sst/shared/actions/contacts.py 2011-11-15 19:12:12 +0000
213+++ ubuntuone/web/tests/sst/shared/actions/contacts.py 2011-12-09 19:54:29 +0000
214@@ -22,16 +22,16 @@
215
216 def open():
217 """Open the Contacts page and assert it's title."""
218- link_click(_get_contacts_link())
219+ click_link(_get_contacts_link())
220 switch_to_window()
221- assert_title()
222+ assert_page_title()
223
224 def _get_contacts_link():
225 return get_element_by_css('#main-nav .contacts')
226
227-def assert_title():
228+def assert_page_title():
229 """Assert that the title of the page is the expected."""
230- title_is(u'Ubuntu One : Contacts')
231+ assert_title(u'Ubuntu One : Contacts')
232
233 def add_contact(contact):
234 """Add a new contact.
235@@ -41,11 +41,11 @@
236
237 """
238 link_add = get_element(css_class='add-button')
239- link_click(link_add)
240+ click_link(link_add)
241 wait_for_action_to_complete()
242 _fill_contact(contact)
243 link_save = get_elements(css_class='save-button')[0]
244- element_click(link_save)
245+ click_element(link_save)
246 wait_for_action_to_complete()
247
248 def edit_contact(edited_contact):
249@@ -56,11 +56,11 @@
250
251 """
252 link_edit = get_element(css_class='edit-button')
253- element_click(link_edit)
254+ click_element(link_edit)
255 wait_for_action_to_complete()
256 _fill_contact(edited_contact)
257 link_save = get_elements(css_class='save-button')[0]
258- element_click(link_save)
259+ click_element(link_save)
260 wait_for_action_to_complete()
261
262 def _fill_contact(contact):
263@@ -91,15 +91,15 @@
264
265 """
266 if name.title:
267- textfield_write('names-title', name.title)
268+ write_textfield('names-title', name.title)
269 if name.first_name:
270- textfield_write('names-first_name', name.first_name)
271+ write_textfield('names-first_name', name.first_name)
272 if name.middle_name:
273- textfield_write('names-middle_name', name.middle_name)
274+ write_textfield('names-middle_name', name.middle_name)
275 if name.last_name:
276- textfield_write('names-last_name', name.last_name)
277+ write_textfield('names-last_name', name.last_name)
278 if name.suffix:
279- textfield_write('names-suffix', name.suffix)
280+ write_textfield('names-suffix', name.suffix)
281
282 def _fill_contact_emails(emails):
283 """Fill the contact emails information.
284@@ -109,10 +109,10 @@
285
286 """
287 for index, email in enumerate(emails):
288- set_select('%d-email_addresses-description' % index,
289+ set_dropdown_value('%d-email_addresses-description' % index,
290 email.description)
291- textfield_write('%d-email_addresses-address' % index, email.address)
292- element_click('add-email-address')
293+ write_textfield('%d-email_addresses-address' % index, email.address)
294+ click_element('add-email-address')
295
296 def _fill_contact_phones(phones):
297 """Fill the contact phones information.
298@@ -122,9 +122,9 @@
299
300 """
301 for index, phone in enumerate(phones):
302- set_select('%d-phone_numbers-description' % index, phone.description)
303- textfield_write('%d-phone_numbers-number' % index, phone.number)
304- element_click('add-phone-number')
305+ set_dropdown_value('%d-phone_numbers-description' % index, phone.description)
306+ write_textfield('%d-phone_numbers-number' % index, phone.number)
307+ click_element('add-phone-number')
308
309 def _fill_contact_addresses(addresses):
310 """Fill the contact addresses information.
311@@ -134,15 +134,15 @@
312
313 """
314 for index, address in enumerate(addresses):
315- set_select('%d-addresses-description' % index, address.description)
316- textfield_write('%d-addresses-address1' % index, address.address1)
317- textfield_write('%d-addresses-address2' % index, address.address2)
318- textfield_write('%d-addresses-pobox' % index, address.po_box)
319- textfield_write('%d-addresses-city' % index, address.city)
320- textfield_write('%d-addresses-state' % index, address.state)
321- textfield_write('%d-addresses-postalcode' % index, address.postal_code)
322- textfield_write('%d-addresses-country' % index, address.country)
323- element_click('add-postal-address')
324+ set_dropdown_value('%d-addresses-description' % index, address.description)
325+ write_textfield('%d-addresses-address1' % index, address.address1)
326+ write_textfield('%d-addresses-address2' % index, address.address2)
327+ write_textfield('%d-addresses-pobox' % index, address.po_box)
328+ write_textfield('%d-addresses-city' % index, address.city)
329+ write_textfield('%d-addresses-state' % index, address.state)
330+ write_textfield('%d-addresses-postalcode' % index, address.postal_code)
331+ write_textfield('%d-addresses-country' % index, address.country)
332+ click_element('add-postal-address')
333
334 def _fill_contact_instant_messaging_addresses(instant_messaging_addresses):
335 """Fill the contact instant messaging information.
336@@ -152,9 +152,9 @@
337
338 """
339 for index, address in enumerate(instant_messaging_addresses):
340- set_select('%d-im_addresses-description' % index, address.description)
341- textfield_write('%d-im_addresses-address' % index, address.address)
342- element_click('add-im-address')
343+ set_dropdown_value('%d-im_addresses-description' % index, address.description)
344+ write_textfield('%d-im_addresses-address' % index, address.address)
345+ click_element('add-im-address')
346
347 def _fill_contact_urls(urls):
348 """Fill the contact URLs information.
349@@ -164,9 +164,9 @@
350
351 """
352 for index, url in enumerate(urls):
353- textfield_write('%d-urls-description' % index, url.description)
354- textfield_write('%d--urls-address' % index, url.url)
355- element_click('add-url')
356+ write_textfield('%d-urls-description' % index, url.description)
357+ write_textfield('%d--urls-address' % index, url.url)
358+ click_element('add-url')
359
360 def _fill_contact_role(role):
361 """Fill the contact role information.
362@@ -176,15 +176,15 @@
363
364 """
365 if role.company:
366- textfield_write('work-company', role.company)
367+ write_textfield('work-company', role.company)
368 if role.department:
369- textfield_write('work-department', role.department)
370+ write_textfield('work-department', role.department)
371 if role.job_title:
372- textfield_write('work-job_title', role.job_title)
373+ write_textfield('work-job_title', role.job_title)
374 if role.manager_name:
375- textfield_write('work-manager_name', role.manager_name)
376+ write_textfield('work-manager_name', role.manager_name)
377 if role.assitant_name:
378- textfield_write('work-assistant_name', role.assistant_name)
379+ write_textfield('work-assistant_name', role.assistant_name)
380
381 def _fill_contact_about_information(about_information):
382 """Fill the additional information about the contact.
383@@ -194,16 +194,16 @@
384
385 """
386 if about_information.nickname:
387- textfield_write('personal-nick_name', about_information.nickname)
388+ write_textfield('personal-nick_name', about_information.nickname)
389 if about_information.birth_date:
390- textfield_write('personal-birth_date', about_information.birth_date)
391+ write_textfield('personal-birth_date', about_information.birth_date)
392 if about_information.spouse_name:
393- textfield_write('personal-spouse_name', about_information.spouse_name)
394+ write_textfield('personal-spouse_name', about_information.spouse_name)
395 if about_information.wedding_date:
396- textfield_write('personal-wedding_date',
397+ write_textfield('personal-wedding_date',
398 about_information.wedding_date)
399 if about_information.notes:
400- textfield_write('personal-notes', about_information.notes)
401+ write_textfield('personal-notes', about_information.notes)
402
403 def assert_contact_information(contact):
404 """Assert that the information of the displayed contact is the expected.
405@@ -252,10 +252,10 @@
406 display_name = _get_contact_display_name_in_list(contact_information.name)
407 element_contact = _get_element_contact_record(contact_identifier)
408 element_name = element_contact.find_element_by_css_selector('.name a')
409- text_is(element_name, display_name)
410+ assert_text(element_name, display_name)
411 if contact_information.emails:
412 element_email = element_contact.find_element_by_css_selector('.email')
413- text_is(element_email, contact_information.emails[0].address)
414+ assert_text(element_email, contact_information.emails[0].address)
415
416 def _get_contact_display_name_in_list(name):
417 """Get the expected name to display in the contacts list.
418@@ -314,7 +314,7 @@
419 names.append(name.suffix)
420 display_name = ' '.join(names)
421 label = get_element_by_css('#names>h1')
422- text_is(label, display_name)
423+ assert_text(label, display_name)
424
425 def _assert_contact_emails(emails):
426 """Assert that the email addresses of the displayed contact are the
427@@ -327,8 +327,8 @@
428 elements_email_descriptions = get_elements_by_css('#email_addresses dt')
429 elements_email_addresses = get_elements_by_css('#email_addresses a')
430 for index, email in enumerate(emails):
431- text_is(elements_email_descriptions[index], '%s:' % email.description)
432- text_is(elements_email_addresses[index], email.address)
433+ assert_text(elements_email_descriptions[index], '%s:' % email.description)
434+ assert_text(elements_email_addresses[index], email.address)
435
436 def delete_contact():
437 """Delete the opened contact."""
438@@ -336,9 +336,9 @@
439 element_contact = _get_element_contact_record(contact_identifier)
440 element_contact_checkbox = element_contact. \
441 find_element_by_css_selector('.contact-delete-checkbox')
442- checkbox_set(element_contact_checkbox, True)
443- element_click('delete-selected')
444- alert_accept('Delete selected contacts?')
445+ set_checkbox_value(element_contact_checkbox, True)
446+ click_element('delete-selected')
447+ accept_alert('Delete selected contacts?')
448 wait_for_action_to_complete()
449
450 def assert_contact_exists(identifier):
451
452=== modified file 'ubuntuone/web/tests/sst/shared/actions/dashboard.py'
453--- ubuntuone/web/tests/sst/shared/actions/dashboard.py 2011-11-15 06:58:55 +0000
454+++ ubuntuone/web/tests/sst/shared/actions/dashboard.py 2011-12-09 19:54:29 +0000
455@@ -19,17 +19,17 @@
456 from sst.actions import *
457
458 def open():
459- link_click(_get_dashboard_link())
460- assert_title(), 'Dashboard should be opened'
461+ click_link(_get_dashboard_link())
462+ assert_page_title(), 'Dashboard should be opened'
463
464 def _get_dashboard_link():
465 return get_element_by_css('#main-nav .dashboard')
466
467-def assert_title():
468- title_is(u'Ubuntu One : Dashboard')
469+def assert_page_title():
470+ assert_title(u'Ubuntu One : Dashboard')
471
472 def assert_welcome_message(user_full_name):
473- text_is(_get_welcome_element(), 'Hi %s! Welcome Back' % user_full_name)
474+ assert_text(_get_welcome_element(), 'Hi %s! Welcome Back' % user_full_name)
475
476 def _get_welcome_element():
477 return get_element_by_css('header > hgroup > h1')
478
479=== modified file 'ubuntuone/web/tests/sst/shared/actions/files.py'
480--- ubuntuone/web/tests/sst/shared/actions/files.py 2011-11-24 05:09:54 +0000
481+++ ubuntuone/web/tests/sst/shared/actions/files.py 2011-12-09 19:54:29 +0000
482@@ -26,34 +26,34 @@
483
484 def open():
485 """Open the files page and assert it's title."""
486- link_click(_get_files_link())
487+ click_link(_get_files_link())
488 switch_to_window()
489- assert_title()
490+ assert_page_title()
491
492 def _get_files_link():
493 return get_element_by_css('#main-nav .files')
494
495-def assert_title():
496+def assert_page_title():
497 """Assert that the title of the page is the expected."""
498- title_is(u'Ubuntu One : My Storage')
499+ assert_title(u'Ubuntu One : My Storage')
500
501 def click_upload_file():
502 """Click the Upload file button and wait for the upload overlay
503 to appear.
504
505 """
506- element_click('upload-file-button', wait=False)
507+ click_element('upload-file-button', wait=False)
508 upload_overlay = get_element(id='upload-overlay')
509- waitfor(upload_overlay.is_displayed)
510+ wait_for(upload_overlay.is_displayed)
511
512 def click_new_folder():
513 """Click the New folder link and wait for the new folder overlay
514 to appear.
515
516 """
517- element_click('new-folder-button', wait=False)
518+ click_element('new-folder-button', wait=False)
519 new_folder_overlay = get_element(id='new-folder-overlay')
520- waitfor(new_folder_overlay.is_displayed)
521+ wait_for(new_folder_overlay.is_displayed)
522
523 def upload_file(path):
524 """Upload a file.
525@@ -65,7 +65,7 @@
526 click_upload_file()
527 input_file = _get_elem('upload-overlay-file')
528 input_file.send_keys(path)
529- button_click('upload-overlay-upload-button')
530+ click_button('upload-overlay-upload-button')
531 # TODO set a waiting time proportional to the size of the file to upload.
532 wait_for_action_to_complete()
533
534@@ -137,7 +137,7 @@
535 element_file_row = get_file_row_element(name)
536 element_more = element_file_row.find_element_by_xpath(
537 'td[@class="files-td-expander expand-row-link"]/a')
538- element_click(element_more)
539+ click_element(element_more)
540
541 def show_file_details(name):
542 if not _are_details_shown:
543@@ -209,7 +209,7 @@
544 # XXX this element requires an identifier.
545 element_file_type = get_element_by_xpath('id("%s-details")//li[3]/strong'
546 % _get_file_identifier(name))
547- text_is(element_file_type, type)
548+ assert_text(element_file_type, type)
549
550 def publish_file(name):
551 """Publish a file.
552@@ -220,7 +220,7 @@
553 """
554 show_file_details(name)
555 identifier = _get_file_identifier(name)
556- element_click(_get_link_publish_file(identifier))
557+ click_element(_get_link_publish_file(identifier))
558 wait_for_action_to_complete()
559
560 def assert_file_published(name):
561@@ -257,7 +257,7 @@
562 def go_to_public_url(name):
563 base_url, path = get_public_url(name)
564 set_base_url(base_url)
565- goto(path)
566+ go_to(path)
567
568 def stop_publishing_file(name):
569 """Stop publishing a file.
570@@ -268,7 +268,7 @@
571 """
572 show_file_details(name)
573 identifier = _get_file_identifier(name)
574- element_click(_get_link_stop_publishing_file(identifier))
575+ click_element(_get_link_stop_publishing_file(identifier))
576 wait_for_action_to_complete()
577
578 def assert_file_not_published(name):
579@@ -294,7 +294,7 @@
580 """
581 show_file_details(name)
582 identifier = _get_file_identifier(name)
583- link_click(_get_link_download_file(identifier))
584+ click_link(_get_link_download_file(identifier))
585
586 def get_download_url(name):
587 """Get the downlaod link of a file stored on the Ubuntu One service.
588@@ -316,8 +316,8 @@
589
590 """
591 click_new_folder()
592- textfield_write('new-folder-overlay-name', name)
593- button_click('new-folder-overlay-create-button')
594+ write_textfield('new-folder-overlay-name', name)
595+ click_button('new-folder-overlay-create-button')
596 wait_for_action_to_complete()
597
598 def _get_link_share_folder(identifier):
599@@ -350,7 +350,7 @@
600 """
601 element_row = get_file_row_element(name)
602 link_folder = element_row.find_element_by_css_selector('a')
603- element_click(link_folder)
604+ click_element(link_folder)
605 wait_for_action_to_complete()
606
607 def assert_breadcrumb(*path):
608@@ -361,8 +361,8 @@
609
610 """
611 breadcrumbs = get_elements(css_class='breadcrumb')
612- text_is(breadcrumbs[0], 'My Storage')
613- map(text_is, breadcrumbs[1:], path)
614+ assert_text(breadcrumbs[0], 'My Storage')
615+ map(assert_text, breadcrumbs[1:], path)
616
617 def go_to_breadcrumb(*path):
618 """Open a folder from the breadcrumb path.
619@@ -378,7 +378,7 @@
620 url += 'f/' + '/'.join(escaped_path)
621 element_breadcrumb_link = get_element_by_css('.breadcrumb[href="%s"]'
622 % url)
623- link_click(element_breadcrumb_link)
624+ click_link(element_breadcrumb_link)
625 wait_for_action_to_complete()
626
627 def _fill_sharing_dialog(email, share_name, allow_modification=True):
628@@ -392,9 +392,9 @@
629 will be allowed to modify it. The default value is True.
630
631 """
632- textfield_write('sharing-overlay-email', email)
633- textfield_write('sharing-overlay-name', share_name)
634- checkbox_set('sharing-overlay-readwrite', allow_modification)
635+ write_textfield('sharing-overlay-email', email)
636+ write_textfield('sharing-overlay-name', share_name)
637+ set_checkbox_value('sharing-overlay-readwrite', allow_modification)
638
639 def share_folder(name, email, share_name, allow_modification=True):
640 """Share a folder.
641@@ -411,11 +411,11 @@
642 show_file_details(name)
643 identifier = _get_file_identifier(name)
644 link_share_folder = _get_link_share_folder(identifier)
645- element_click(link_share_folder)
646+ click_element(link_share_folder)
647 sharing_overlay = get_element(tag='*', id='sharing-overlay')
648- waitfor(sharing_overlay.is_displayed)
649+ wait_for(sharing_overlay.is_displayed)
650 _fill_sharing_dialog(email, share_name, allow_modification)
651- button_click('sharing-overlay-share-button')
652+ click_button('sharing-overlay-share-button')
653 wait_for_action_to_complete()
654
655 def _get_shared_with_elements(name):
656@@ -534,8 +534,8 @@
657 show_file_details(name)
658 link_stop_sharing = _get_stop_sharing_folder(name, email, date,
659 allow_modification, accepted)
660- element_click(link_stop_sharing)
661- alert_accept()
662+ click_element(link_stop_sharing)
663+ accept_alert()
664 wait_for_action_to_complete()
665
666 def delete_file(name):
667@@ -548,6 +548,6 @@
668 show_file_details(name)
669 identifier = _get_file_identifier(name)
670 link_delete = _get_link_delete_file(identifier)
671- element_click(link_delete)
672- alert_accept()
673+ click_element(link_delete)
674+ accept_alert()
675 wait_for_action_to_complete()
676
677=== modified file 'ubuntuone/web/tests/sst/shared/actions/header.py'
678--- ubuntuone/web/tests/sst/shared/actions/header.py 2011-12-02 06:28:29 +0000
679+++ ubuntuone/web/tests/sst/shared/actions/header.py 2011-12-09 19:54:29 +0000
680@@ -19,7 +19,7 @@
681 from sst.actions import *
682
683 def click_login_or_sign_up():
684- link_click(_get_login_or_sign_up_link())
685+ click_link(_get_login_or_sign_up_link())
686
687 def _get_login_or_sign_up_link():
688 return get_element(text='Log in or Sign up')
689@@ -31,7 +31,7 @@
690
691 def _assert_full_name(full_name):
692 welcome_element = get_element_by_css('#ac-status > span')
693- text_is(welcome_element, 'Welcome %s' % full_name[:40])
694+ assert_text(welcome_element, 'Welcome %s' % full_name[:40])
695
696 def _get_my_account_link():
697 return get_element(tag='a', css_class='account', text='My Account')
698@@ -40,10 +40,10 @@
699 return get_element(tag='a', text='logout')
700
701 def open_my_account():
702- link_click(_get_my_account_link())
703+ click_link(_get_my_account_link())
704
705 def logout():
706- link_click(_get_logout_link())
707+ click_link(_get_logout_link())
708
709 def assert_logout():
710 _get_login_or_sign_up_link()
711
712=== modified file 'ubuntuone/web/tests/sst/shared/actions/loading.py'
713--- ubuntuone/web/tests/sst/shared/actions/loading.py 2011-11-15 19:12:12 +0000
714+++ ubuntuone/web/tests/sst/shared/actions/loading.py 2011-12-09 19:54:29 +0000
715@@ -28,5 +28,5 @@
716 # the bar appears tests will fail.
717 sleep(3)
718 waiting_bar = get_element(css_class='yui3-busy-waiting')
719- waitfor(fails, is_displayed, waiting_bar)
720+ wait_for(fails, assert_displayed, waiting_bar)
721
722
723=== modified file 'ubuntuone/web/tests/sst/shared/actions/music.py'
724--- ubuntuone/web/tests/sst/shared/actions/music.py 2011-12-08 22:59:44 +0000
725+++ ubuntuone/web/tests/sst/shared/actions/music.py 2011-12-09 19:54:29 +0000
726@@ -22,19 +22,19 @@
727
728 def open():
729 """Open the music page and assert it's title."""
730- # TODO when the music player is released, then we have to uncomment the following line and delete the goto,
731+ # TODO when the music player is released, then we have to uncomment the following line and delete the go_to,
732 # to access the tab properly.
733- #link_click(_get_music_link())
734- goto('music/player')
735+ #click_link(_get_music_link())
736+ go_to('music/player')
737 switch_to_window()
738- assert_title()
739+ assert_page_title()
740
741 def _get_music_link():
742 return get_element_by_css('#main-nav .music')
743
744-def assert_title():
745+def assert_page_title():
746 """Assert that the title of the page is the expected."""
747- title_is(u'Ubuntu One : Music')
748+ assert_title(u'Ubuntu One : Music')
749
750 def play_song(song):
751 _open_songs()
752@@ -45,8 +45,8 @@
753 song_play_button = get_element_by_css('tr[data-u1m-songid="%s"] > ' \
754 'td.c1 > button' \
755 % identifier)
756- button_click(song_play_button)
757- assert not song_play_button.is_displayed()
758+ click_button(song_play_button)
759+ assert not song_play_button.assert_displayed()
760
761 def assert_songs_added_to_queue(songs_list):
762 number_of_songs = len(songs_list)
763@@ -65,7 +65,7 @@
764 _assert_message_content(message_content)
765
766 def _assert_message_displayed():
767- assert _get_message_element().is_displayed()
768+ assert _get_message_element().assert_displayed()
769
770 def _assert_message_content(message_content):
771 assert _get_message_element().text == message_content
772@@ -80,12 +80,12 @@
773
774 def _select_song_by_id(identifier):
775 song_checkbox = get_element_by_css('.c2 > input[value="%s"]' % identifier)
776- checkbox_set(song_checkbox, True)
777+ set_checkbox_value(song_checkbox, True)
778
779 def _open_songs():
780 if not _is_songs_opened():
781 songs_element = _get_songs_element()
782- element_click(songs_element)
783+ click_element(songs_element)
784 _wait_for_action_to_complete()
785
786 def _is_songs_opened():
787@@ -110,12 +110,12 @@
788 assert expected_title == player_title_element.text
789
790 def assert_player_playing():
791- assert _get_stop_button().is_displayed()
792- assert not _get_play_button().is_displayed()
793+ assert _get_stop_button().assert_displayed()
794+ assert not _get_play_button().assert_displayed()
795
796 def assert_player_paused():
797- assert not _get_stop_button().is_displayed()
798- assert _get_play_button().is_displayed()
799+ assert not _get_stop_button().assert_displayed()
800+ assert _get_play_button().assert_displayed()
801
802 def _get_stop_button():
803 return get_element_by_css('#stop')
804@@ -151,7 +151,7 @@
805
806 def _open_now_playing():
807 if not _is_now_playing_opened():
808- element_click(_get_now_playing_element())
809+ click_element(_get_now_playing_element())
810
811 def _is_now_playing_opened():
812 now_playing_element = _get_now_playing_element()
813@@ -174,4 +174,4 @@
814 # the bar appears tests will fail.
815 sleep(3)
816 waiting_bar = get_element_by_css('.loading-view > .indicator')
817- waitfor(fails, is_displayed, waiting_bar)
818+ wait_for(fails, assert_displayed, waiting_bar)
819
820=== modified file 'ubuntuone/web/tests/sst/shared/actions/notes.py'
821--- ubuntuone/web/tests/sst/shared/actions/notes.py 2011-11-17 02:19:20 +0000
822+++ ubuntuone/web/tests/sst/shared/actions/notes.py 2011-12-09 19:54:29 +0000
823@@ -23,18 +23,18 @@
824
825 def open():
826 """Open the notes page and check its title with an assert."""
827- link_click(_get_notes_link(), wait=False)
828+ click_link(_get_notes_link(), wait=False)
829 switch_to_window()
830- assert_title()
831+ assert_page_title()
832
833
834 def _get_notes_link():
835 return get_element_by_css('#main-nav .notes')
836
837
838-def assert_title():
839+def assert_page_title():
840 """Assert that the title of the page is the expected."""
841- title_is(u'Ubuntu One : Notes')
842+ assert_title(u'Ubuntu One : Notes')
843
844
845 def assert_note_exists(title):
846@@ -42,7 +42,7 @@
847
848
849 def select_note(title):
850- link_click(_get_note_link(title))
851+ click_link(_get_note_link(title))
852 wait_for_action_to_complete()
853
854
855@@ -80,13 +80,13 @@
856
857 def _click_add_note():
858 link_add = get_element(css_class='add-button')
859- link_click(link_add)
860+ click_link(link_add)
861 wait_for_action_to_complete()
862
863
864 def _fill(title, body):
865 if title:
866- textfield_write('id_title', title)
867+ write_textfield('id_title', title)
868 if body:
869 switch_to_frame('id_body_editor')
870 body_element = get_element(tag='body')
871@@ -98,7 +98,7 @@
872
873 def _save():
874 link_save = get_elements(css_class='save-button')[0]
875- element_click(link_save)
876+ click_element(link_save)
877 wait_for_action_to_complete()
878
879
880@@ -111,7 +111,7 @@
881
882 def _click_edit_note():
883 link_edit = get_elements(css_class='edit-button')[0]
884- link_click(link_edit)
885+ click_link(link_edit)
886 wait_for_action_to_complete()
887
888
889@@ -119,11 +119,11 @@
890 """Delete the note"""
891 select_note(title)
892 delete_button = get_element_by_css('li.selected > a.delete-button')
893- element_click(delete_button)
894- alert_accept()
895+ click_element(delete_button)
896+ accept_alert()
897 wait_for_action_to_complete()
898
899
900 def assert_note_was_deleted(title):
901 fails(assert_note_exists, title)
902- text_is('notes-main', '"%s" has been deleted' % title)
903+ assert_text('notes-main', '"%s" has been deleted' % title)
904
905=== modified file 'ubuntuone/web/tests/sst/shared/actions/payment.py'
906--- ubuntuone/web/tests/sst/shared/actions/payment.py 2011-12-02 15:01:13 +0000
907+++ ubuntuone/web/tests/sst/shared/actions/payment.py 2011-12-09 19:54:29 +0000
908@@ -23,9 +23,9 @@
909 from sst.actions import *
910 from utils import paymentperiods
911
912-def assert_title():
913+def assert_page_title():
914 """Assert that the title of the page is the expected."""
915- title_is(u'Ubuntu One : Checkout')
916+ assert_title(u'Ubuntu One : Checkout')
917
918 def assert_music_streaming_subscription(period):
919 """Assert that the information of the new music streaming subscription
920@@ -144,11 +144,11 @@
921 country -- The country of the address (default 'United States').
922
923 """
924- textfield_write('id_street', street)
925- textfield_write('id_city', city)
926- textfield_write('id_state', state)
927- textfield_write('id_postal', postal_code)
928- set_select('id_country', country)
929+ write_textfield('id_street', street)
930+ write_textfield('id_city', city)
931+ write_textfield('id_state', state)
932+ write_textfield('id_postal', postal_code)
933+ set_dropdown_value('id_country', country)
934
935 def set_credit_card_details(card_type='Visa', name='Test Name',
936 number='4111111111111111', ccv='123',
937@@ -167,12 +167,12 @@
938 expiration_year -- The year of expiration (default '2015')
939
940 """
941- set_select('id_card_type', card_type)
942- textfield_write('id_card_holder', name)
943- textfield_write('id_card_number', number)
944- textfield_write('id_card_ccv', ccv)
945- set_select('id_card_expiration_0', expiration_month)
946- set_select('id_card_expiration_1', expiration_year)
947+ set_dropdown_value('id_card_type', card_type)
948+ write_textfield('id_card_holder', name)
949+ write_textfield('id_card_number', number)
950+ write_textfield('id_card_ccv', ccv)
951+ set_dropdown_value('id_card_expiration_0', expiration_month)
952+ set_dropdown_value('id_card_expiration_1', expiration_year)
953
954 def place_order_with_valid_card():
955 """Place the order with a credit card that will be accepted on the
956@@ -198,8 +198,8 @@
957 the order.
958
959 """
960- button_click(get_element(css_class='cta', value='Purchase'))
961+ click_button(get_element(css_class='cta', value='Purchase'))
962
963 def confirm_payment_details():
964- title_is(u'Ubuntu One : Confirm Payment Details')
965- link_click(get_element(css_class='cta', href='confirmed'))
966+ assert_title(u'Ubuntu One : Confirm Payment Details')
967+ click_link(get_element(css_class='cta', href='confirmed'))
968
969=== modified file 'ubuntuone/web/tests/sst/shared/actions/payment_confirmed.py'
970--- ubuntuone/web/tests/sst/shared/actions/payment_confirmed.py 2011-12-02 15:01:13 +0000
971+++ ubuntuone/web/tests/sst/shared/actions/payment_confirmed.py 2011-12-09 19:54:29 +0000
972@@ -23,9 +23,9 @@
973 from datetime import datetime
974 from utils import paymentperiods
975
976-def assert_title():
977+def assert_page_title():
978 """Assert that the title of the page is the expected."""
979- title_is(u'Ubuntu One : Confirm Payment Details')
980+ assert_title(u'Ubuntu One : Confirm Payment Details')
981
982 def assert_failed_payment():
983 """Assert that the payment failed."""
984@@ -55,16 +55,16 @@
985 # TODO assert the paid amount.
986 # TODO assert payments in euros.
987 element_expire_date = _get_purchase_details_data_elements()[0]
988- text_is(element_expire_date, expire_date.strftime('%B %-d, %Y'))
989+ assert_text(element_expire_date, expire_date.strftime('%B %-d, %Y'))
990 get_element(tag='p', css_class='explanation',
991 text='Your card will automatically be billed $%(price)s ' \
992 '%(period)s' % {'price': str(price), 'period': period})
993 element_payment_status = _get_purchase_details_data_elements()[1]
994- text_is(element_payment_status, 'AUTHORISED')
995+ assert_text(element_payment_status, 'AUTHORISED')
996
997 def _get_purchase_details_data_elements():
998 return get_elements_by_css('dl.purchase_details > dd')
999
1000 def view_account():
1001 """Go to the account information page."""
1002- link_click(get_element(tag='a', text='View your account'))
1003+ click_link(get_element(tag='a', text='View your account'))
1004
1005=== modified file 'ubuntuone/web/tests/sst/shared/actions/services.py'
1006--- ubuntuone/web/tests/sst/shared/actions/services.py 2011-12-02 06:28:00 +0000
1007+++ ubuntuone/web/tests/sst/shared/actions/services.py 2011-12-09 19:54:29 +0000
1008@@ -24,15 +24,15 @@
1009
1010 def open():
1011 """Open the services page and assert it's title."""
1012- goto('/services/')
1013- assert_title()
1014+ go_to('/services/')
1015+ assert_page_title()
1016
1017-def assert_title():
1018+def assert_page_title():
1019 """Assert that the title of the page is the expected."""
1020- title_is(u'Ubuntu One : Services')
1021+ assert_title(u'Ubuntu One : Services')
1022
1023 def agree_and_subscribe_to_free_plan():
1024- button_click(get_element(name='subscribe'))
1025+ click_button(get_element(name='subscribe'))
1026
1027 def assert_services_information():
1028 """Assert that the information about the services is the expected."""
1029@@ -80,18 +80,18 @@
1030
1031 def buy_music_streaming_monthly():
1032 """Buy the monthly music streaming service."""
1033- radio_select('ms1')
1034- button_click(get_elements(css_class='buy-now',
1035+ set_radio_value('ms1')
1036+ click_button(get_elements(css_class='buy-now',
1037 text='Buy now and go to checkout')[0])
1038
1039 def buy_music_streaming_yearly():
1040 """Buy the yearly music streaming service."""
1041- radio_select('ms2')
1042+ set_radio_value('ms2')
1043 buy_music_streaming()
1044
1045 def buy_music_streaming():
1046 """Click the button to buy the music streaming service."""
1047- button_click(get_elements(css_class='buy-now',
1048+ click_button(get_elements(css_class='buy-now',
1049 text='Buy now and go to checkout')[0])
1050
1051 def assert_storage(quantity):
1052@@ -101,20 +101,20 @@
1053 quantity -- The expected storage quantity.
1054
1055 """
1056- text_is('qty', str(quantity))
1057- text_is('storage-gb', '%sGB' % (quantity * 20))
1058+ assert_text('qty', str(quantity))
1059+ assert_text('storage-gb', '%sGB' % (quantity * 20))
1060 monthly_price = quantity * 2.99
1061- text_is('storage-monthly-price', '$%s' % monthly_price)
1062+ assert_text('storage-monthly-price', '$%s' % monthly_price)
1063 annual_price = quantity * 29.99
1064- text_is('storage-annual-price', '$%s' % annual_price)
1065+ assert_text('storage-annual-price', '$%s' % annual_price)
1066
1067 def increase_storage_quantity():
1068 """Click the button that increases the storage quantity to buy."""
1069- button_click('plus_qty')
1070+ click_button('plus_qty')
1071
1072 def decrease_storage_quantity():
1073 """Click the button that decreases the storage quantity to buy."""
1074- button_click('minus_qty')
1075+ click_button('minus_qty')
1076
1077 def set_storage_quantity(quantity):
1078 """Set the storage quantity to buy.
1079@@ -123,19 +123,19 @@
1080 quantity -- The quantity to buy.
1081
1082 """
1083- textfield_write('qty', str(quantity))
1084+ write_textfield('qty', str(quantity))
1085
1086 def buy_extra_storage_monthly():
1087 """Buy the monthly extra storage service."""
1088- radio_select('st1')
1089+ set_radio_value('st1')
1090 buy_extra_storage()
1091
1092 def buy_extra_storage_yearly():
1093 """Buy the yearly extra storage service."""
1094- radio_select('st2')
1095+ set_radio_value('st2')
1096 buy_extra_storage()
1097
1098 def buy_extra_storage():
1099 """Click the button to buy extra storage."""
1100- button_click(get_elements(css_class='buy-now',
1101+ click_button(get_elements(css_class='buy-now',
1102 text='Buy now and go to checkout')[1])
1103
1104=== modified file 'ubuntuone/web/tests/sst/shared/actions/setup.py'
1105--- ubuntuone/web/tests/sst/shared/actions/setup.py 2011-12-08 15:21:26 +0000
1106+++ ubuntuone/web/tests/sst/shared/actions/setup.py 2011-12-09 19:54:29 +0000
1107@@ -42,15 +42,15 @@
1108 """
1109 set_base_url(get_base_url())
1110 set_wait_timeout(DEFAULT_TIMEOUT)
1111- goto()
1112- waitfor(title_is, 'Ubuntu One : Home')
1113+ go_to()
1114+ wait_for(assert_title, 'Ubuntu One : Home')
1115 header_actions.click_login_or_sign_up()
1116 user_name = full_name
1117 user_email = email
1118 if new_user:
1119 user_uuid = str(uuid.uuid1())
1120 user_name = 'Test user ' + user_uuid
1121- user_email = user_uuid + '@' IMAP_SERVER
1122+ user_email = user_uuid + '@' + IMAP_SERVER
1123 sso_actions.create_new_account(user_name, user_email, 'Hola123*')
1124 confirmation_code = mail.get_confirmation_code_for_address(user_email)
1125 sso_actions.confirm_email(confirmation_code)
1126
1127=== modified file 'ubuntuone/web/tests/sst/shared/actions/sso.py'
1128--- ubuntuone/web/tests/sst/shared/actions/sso.py 2011-12-02 06:28:00 +0000
1129+++ ubuntuone/web/tests/sst/shared/actions/sso.py 2011-12-09 19:54:29 +0000
1130@@ -31,36 +31,36 @@
1131 password -- The password of the user.
1132
1133 """
1134- waitfor(title_is, 'Log in')
1135+ wait_for(assert_title, 'Log in')
1136 switch_to_window()
1137- is_textfield('id_email')
1138- is_textfield('id_password')
1139- textfield_write('id_email', email)
1140- textfield_write('id_password', password)
1141- button_click(get_element(css_class='btn', name='continue'), wait=False)
1142+ assert_textfield('id_email')
1143+ assert_textfield('id_password')
1144+ write_textfield('id_email', email)
1145+ write_textfield('id_password', password)
1146+ click_button(get_element(css_class='btn', name='continue'), wait=False)
1147
1148 def create_new_account(full_name, email, password):
1149- link_click(get_element(href='+new_account'))
1150- waitfor(title_is, 'Create account')
1151- textfield_write('id_displayname', full_name)
1152- textfield_write('id_email', email)
1153- textfield_write('id_password', password)
1154- textfield_write('id_passwordconfirm', password)
1155- button_click(get_element(name='continue'))
1156+ click_link(get_element(href='+new_account'))
1157+ wait_for(assert_title, 'Create account')
1158+ write_textfield('id_displayname', full_name)
1159+ write_textfield('id_email', email)
1160+ write_textfield('id_password', password)
1161+ write_textfield('id_passwordconfirm', password)
1162+ click_button(get_element(name='continue'))
1163
1164 def confirm_email(confirmation_code):
1165- textfield_write(get_element(name='confirmation_code'), confirmation_code)
1166- button_click(get_element(css_class='btn', text='Continue'))
1167+ write_textfield(get_element(name='confirmation_code'), confirmation_code)
1168+ click_button(get_element(css_class='btn', text='Continue'))
1169
1170 def authenticate():
1171- waitfor(title_is, 'Authenticate to %s' % get_base_url())
1172- waitfor(get_element, tag='body')
1173- button_click(get_element(css_class='btn', name='yes'))
1174+ wait_for(assert_title, 'Authenticate to %s' % get_base_url())
1175+ wait_for(get_element, tag='body')
1176+ click_button(get_element(css_class='btn', name='yes'))
1177
1178 def assert_logout():
1179- title_is('You have been logged out')
1180- text_is(get_element(tag='h1', css_class='main'),
1181+ assert_title('You have been logged out')
1182+ assert_text(get_element(tag='h1', css_class='main'),
1183 'You have been logged out')
1184
1185 def return_to_site():
1186- link_click(get_element_by_css('.returnto a'))
1187+ click_link(get_element_by_css('.returnto a'))
1188
1189=== modified file 'ubuntuone/web/tests/sst/smoketest/blogpage.py'
1190--- ubuntuone/web/tests/sst/smoketest/blogpage.py 2011-10-06 13:05:07 +0000
1191+++ ubuntuone/web/tests/sst/smoketest/blogpage.py 2011-12-09 19:54:29 +0000
1192@@ -20,10 +20,10 @@
1193 '''Check existence of Blog page'''
1194
1195 from sst.actions import *
1196-from config import base_url
1197+from setup import get_base_url
1198
1199-set_base_url(base_url)
1200-goto('/blog/')
1201-title_contains('Ubuntu One : Blog')
1202+set_base_url(get_base_url())
1203+go_to('/blog/')
1204+assert_title_contains('Ubuntu One : Blog')
1205 element_header = get_element_by_css('header>h1')
1206-text_is(element_header, 'Ubuntu One blog')
1207+assert_text(element_header, 'Ubuntu One blog')
1208
1209=== modified file 'ubuntuone/web/tests/sst/smoketest/contactspage.py'
1210--- ubuntuone/web/tests/sst/smoketest/contactspage.py 2011-11-15 15:09:05 +0000
1211+++ ubuntuone/web/tests/sst/smoketest/contactspage.py 2011-12-09 19:54:29 +0000
1212@@ -22,8 +22,8 @@
1213 import actions.setup as setup_actions
1214
1215 setup_actions.setup(new_user=False)
1216-goto('/contacts/')
1217-waitfor(title_is, 'Ubuntu One : Contacts')
1218+go_to('/contacts/')
1219+wait_for(assert_title, 'Ubuntu One : Contacts')
1220 get_element(css_class='add-button', text='Add contact')
1221 # possibly add tests for Desktop, Facebook and Ubuntu One Mobile here or
1222 # in seperate tests
1223
1224=== modified file 'ubuntuone/web/tests/sst/smoketest/filespage.py'
1225--- ubuntuone/web/tests/sst/smoketest/filespage.py 2011-09-28 19:32:05 +0000
1226+++ ubuntuone/web/tests/sst/smoketest/filespage.py 2011-12-09 19:54:29 +0000
1227@@ -22,7 +22,7 @@
1228 import actions.setup as setup_actions
1229
1230 setup_actions.setup(new_user=False)
1231-title_is(u'Ubuntu One : Dashboard')
1232-goto('/files/')
1233-title_is(u'Ubuntu One : My Storage')
1234+assert_title(u'Ubuntu One : Dashboard')
1235+go_to('/files/')
1236+assert_title(u'Ubuntu One : My Storage')
1237 get_element(css_class='add-button', text='Share this folder')
1238
1239=== modified file 'ubuntuone/web/tests/sst/smoketest/freeplan.py'
1240--- ubuntuone/web/tests/sst/smoketest/freeplan.py 2011-09-28 18:36:19 +0000
1241+++ ubuntuone/web/tests/sst/smoketest/freeplan.py 2011-12-09 19:54:29 +0000
1242@@ -19,8 +19,8 @@
1243
1244 '''Check existence of Free Plan Page.'''
1245 from sst.actions import *
1246-from config import base_url
1247+from setup import get_base_url
1248
1249-set_base_url(base_url)
1250-goto('/services/free/')
1251+set_base_url(get_base_url())
1252+go_to('/services/free/')
1253 get_element(tag='h1', text='Ubuntu One Free')
1254
1255=== modified file 'ubuntuone/web/tests/sst/smoketest/helppage.py'
1256--- ubuntuone/web/tests/sst/smoketest/helppage.py 2011-09-28 18:08:15 +0000
1257+++ ubuntuone/web/tests/sst/smoketest/helppage.py 2011-12-09 19:54:29 +0000
1258@@ -19,9 +19,9 @@
1259
1260 '''Check existence of Help Page.'''
1261 from sst.actions import *
1262-from config import base_url
1263+from setup import get_base_url
1264
1265-set_base_url(base_url)
1266-goto("/help/")
1267-waitfor(title_is, u"Ubuntu One : Help")
1268+set_base_url(get_base_url())
1269+go_to("/help/")
1270+wait_for(assert_title, u"Ubuntu One : Help")
1271 exists_element(text='contact us')
1272
1273=== modified file 'ubuntuone/web/tests/sst/smoketest/joinpage.py'
1274--- ubuntuone/web/tests/sst/smoketest/joinpage.py 2011-09-28 18:08:15 +0000
1275+++ ubuntuone/web/tests/sst/smoketest/joinpage.py 2011-12-09 19:54:29 +0000
1276@@ -19,8 +19,8 @@
1277
1278 '''Check existence of Join Page.'''
1279 from sst.actions import *
1280-from config import base_url
1281+from setup import get_base_url
1282
1283-set_base_url(base_url)
1284-goto('/services/')
1285-waitfor(title_is, u'Ubuntu One : Services')
1286+set_base_url(get_base_url())
1287+go_to('/services/')
1288+wait_for(assert_title, u'Ubuntu One : Services')
1289
1290=== modified file 'ubuntuone/web/tests/sst/smoketest/mainpage.py'
1291--- ubuntuone/web/tests/sst/smoketest/mainpage.py 2011-09-28 18:08:15 +0000
1292+++ ubuntuone/web/tests/sst/smoketest/mainpage.py 2011-12-09 19:54:29 +0000
1293@@ -19,8 +19,8 @@
1294
1295 '''Check existence of Main Page.'''
1296 from sst.actions import *
1297-from config import base_url
1298+from setup import get_base_url
1299
1300-set_base_url(base_url)
1301-goto('/')
1302-waitfor(title_is, u'Ubuntu One : Home')
1303+set_base_url(get_base_url())
1304+go_to('/')
1305+wait_for(assert_title, u'Ubuntu One : Home')
1306
1307=== modified file 'ubuntuone/web/tests/sst/smoketest/notes.txt'
1308--- ubuntuone/web/tests/sst/smoketest/notes.txt 2011-05-17 19:20:08 +0000
1309+++ ubuntuone/web/tests/sst/smoketest/notes.txt 2011-12-09 19:54:29 +0000
1310@@ -1,7 +1,7 @@
1311 Notes, issues and questions
1312 ===========================
1313
1314-Tests will fail if the test doesn't goto a url first, an easy thing to forget.
1315+Tests will fail if the test doesn't go_to a url first, an easy thing to forget.
1316 Should the check functions all fail with a useful error message if they are
1317-called before goto has been called?
1318+called before go_to has been called?
1319
1320
1321=== modified file 'ubuntuone/web/tests/sst/smoketest/notespage.py'
1322--- ubuntuone/web/tests/sst/smoketest/notespage.py 2011-09-29 17:25:08 +0000
1323+++ ubuntuone/web/tests/sst/smoketest/notespage.py 2011-12-09 19:54:29 +0000
1324@@ -22,6 +22,6 @@
1325 import actions.setup as setup_actions
1326
1327 setup_actions.setup(new_user=False)
1328-goto("/notes/")
1329-setup_actions.waitfor(title_is, u"Ubuntu One : Notes")
1330+go_to("/notes/")
1331+setup_actions.wait_for(assert_title, u"Ubuntu One : Notes")
1332 exists_element(css_class='add-button', text='Add note')
1333
1334=== modified file 'ubuntuone/web/tests/sst/smoketest/services.py'
1335--- ubuntuone/web/tests/sst/smoketest/services.py 2011-11-15 15:11:00 +0000
1336+++ ubuntuone/web/tests/sst/smoketest/services.py 2011-12-09 19:54:29 +0000
1337@@ -21,5 +21,5 @@
1338 import actions.setup as setup_actions
1339
1340 setup_actions.setup(new_user=False)
1341-goto('/services/')
1342-title_is(u'Ubuntu One : Services')
1343+go_to('/services/')
1344+assert_title(u'Ubuntu One : Services')
1345
1346=== modified file 'ubuntuone/web/tests/sst/smoketest/streamingplan.py'
1347--- ubuntuone/web/tests/sst/smoketest/streamingplan.py 2011-10-19 18:56:40 +0000
1348+++ ubuntuone/web/tests/sst/smoketest/streamingplan.py 2011-12-09 19:54:29 +0000
1349@@ -19,9 +19,9 @@
1350
1351 '''Check existence of Streaming Plan Page.'''
1352 from sst.actions import *
1353-from config import base_url
1354+from setup import get_base_url
1355
1356-set_base_url(base_url)
1357-goto('/services/music/')
1358-waitfor(title_is, u'Ubuntu One : Music Streaming')
1359+set_base_url(get_base_url())
1360+go_to('/services/music/')
1361+wait_for(assert_title, u'Ubuntu One : Music Streaming')
1362 exists_element(text='Sign up now')

Subscribers

People subscribed via source and target branches