Merge lp:~nataliabidart/canonical-identity-provider/more-qa-anchors-for-sso into lp:canonical-identity-provider/release

Proposed by Natalia Bidart
Status: Merged
Approved by: Leo Arias
Approved revision: no longer in the source branch.
Merged at revision: 927
Proposed branch: lp:~nataliabidart/canonical-identity-provider/more-qa-anchors-for-sso
Merge into: lp:canonical-identity-provider/release
Diff against target: 2031 lines (+354/-260)
87 files modified
acceptance/actions/subheader.py (+11/-5)
acceptance/helpers.py (+20/-0)
acceptance/pages.py (+35/-29)
acceptance/tests/applications/create_multiple_apps.py (+6/-3)
acceptance/tests/applications/delete_app.py (+9/-5)
acceptance/tests/devices/__init__.py (+3/-1)
acceptance/tests/devices/testcases/test_device_login.py (+2/-2)
acceptance/tests/logout/logout_deep_pages.py (+1/-5)
acceptance/tests/logout/logout_ubuntu.py (+5/-10)
acceptance/tests/new_account/passwords_bad_client-side.csv (+1/-1)
acceptance/tests/new_account/passwords_bad_client-side.py (+7/-8)
acceptance/tests/new_account/passwords_bad_client-side_ubuntuone.csv (+0/-6)
acceptance/tests/new_account/passwords_bad_client-side_ubuntuone.py (+0/-38)
acceptance/tests/new_account/passwords_bad_server-side.csv (+1/-1)
acceptance/tests/new_account/passwords_bad_server-side.py (+5/-11)
acceptance/tests/root/links.py (+3/-5)
requirements/testing.txt (+1/-1)
scripts/acceptance-dev.sh (+6/-1)
scripts/run-acceptance-tests (+3/-0)
src/identityprovider/media/ubuntu/styles.css (+2/-1)
src/identityprovider/templates/server/decide.html (+6/-2)
src/identityprovider/templatetags/menu_item.py (+3/-2)
src/identityprovider/tests/test_views_server.py (+3/-1)
src/webui/templates/account/applications.html (+2/-3)
src/webui/templates/account/confirm_email_invalidation.html (+3/-1)
src/webui/templates/account/confirm_new_email.html (+2/-2)
src/webui/templates/account/delete_email.html (+4/-2)
src/webui/templates/account/edit.html (+3/-1)
src/webui/templates/account/emails.html (+7/-3)
src/webui/templates/account/new_email.html (+3/-1)
src/webui/templates/device/addition-generic.html (+3/-2)
src/webui/templates/device/generate-codes.html (+3/-2)
src/webui/templates/device/list.html (+1/-1)
src/webui/templates/device/print-codes.html (+4/-2)
src/webui/templates/device/removal.html (+2/-1)
src/webui/templates/device/rename.html (+1/-1)
src/webui/templates/device/types.html (+2/-1)
src/webui/templates/enter_token.html (+3/-3)
src/webui/templates/launchpad/base.html (+2/-8)
src/webui/templates/launchpad/registration/confirm_new_account.html (+6/-2)
src/webui/templates/launchpad/registration/email_sent.html (+3/-1)
src/webui/templates/launchpad/registration/forgot_password.html (+5/-1)
src/webui/templates/launchpad/registration/login.html (+3/-1)
src/webui/templates/launchpad/registration/logout.html (+2/-0)
src/webui/templates/launchpad/registration/new_account.html (+5/-1)
src/webui/templates/launchpad/registration/reset_password.html (+3/-1)
src/webui/templates/launchpad/registration/twofactor.html (+5/-1)
src/webui/templates/menu_item.html (+9/-3)
src/webui/templates/select_language.html (+1/-0)
src/webui/templates/ubuntu/base.html (+2/-2)
src/webui/templates/ubuntu/registration/confirm_new_account.html (+3/-1)
src/webui/templates/ubuntu/registration/email_sent.html (+1/-1)
src/webui/templates/ubuntu/registration/forgot_password.html (+3/-2)
src/webui/templates/ubuntu/registration/login.html (+3/-1)
src/webui/templates/ubuntu/registration/new_account.html (+3/-2)
src/webui/templates/ubuntu/registration/reset_password.html (+1/-2)
src/webui/templates/ubuntu/registration/twofactor.html (+3/-1)
src/webui/templates/ubuntuone/account/applications.html (+2/-4)
src/webui/templates/ubuntuone/account/confirm_new_email.html (+2/-2)
src/webui/templates/ubuntuone/account/delete_email.html (+3/-1)
src/webui/templates/ubuntuone/account/edit.html (+3/-1)
src/webui/templates/ubuntuone/account/emails.html (+7/-3)
src/webui/templates/ubuntuone/account/new_email.html (+3/-1)
src/webui/templates/ubuntuone/base.html (+1/-1)
src/webui/templates/ubuntuone/device/list.html (+5/-3)
src/webui/templates/ubuntuone/device/print-codes.html (+7/-5)
src/webui/templates/ubuntuone/device/rename.html (+4/-2)
src/webui/templates/ubuntuone/device/types.html (+1/-1)
src/webui/templates/ubuntuone/enter_token.html (+1/-1)
src/webui/templates/ubuntuone/registration/_create_account_form.html (+3/-2)
src/webui/templates/ubuntuone/registration/_login_form.html (+3/-1)
src/webui/templates/ubuntuone/registration/confirm_new_account.html (+3/-1)
src/webui/templates/ubuntuone/registration/email_sent.html (+1/-1)
src/webui/templates/ubuntuone/registration/forgot_password.html (+3/-2)
src/webui/templates/ubuntuone/registration/reset_password.html (+2/-3)
src/webui/templates/ubuntuone/registration/twofactor.html (+5/-1)
src/webui/templates/ubuntuone/select_language.html (+3/-1)
src/webui/templates/ubuntuone/server/decide.html (+12/-9)
src/webui/templates/widgets/launchpad/login-button.html (+12/-0)
src/webui/templates/widgets/launchpad/logout-button.html (+8/-5)
src/webui/templates/widgets/passwords.html (+1/-1)
src/webui/templates/widgets/ubuntu/login-button.html (+4/-4)
src/webui/templates/widgets/ubuntu/logout-button.html (+2/-2)
src/webui/templates/widgets/ubuntuone/header-me-menu.html (+9/-3)
src/webui/templates/widgets/ubuntuone/personal-menu.html (+1/-1)
src/webui/views/account.py (+3/-2)
src/webui/views/ui.py (+1/-1)
To merge this branch: bzr merge lp:~nataliabidart/canonical-identity-provider/more-qa-anchors-for-sso
Reviewer Review Type Date Requested Status
Leo Arias (community) Approve
Review via email: mp+169038@code.launchpad.net

Commit message

- Adding lots of data-qa-id attrs to several HTML elements for ubuntu, launchpad and ubuntuone templates.
- Bumped revno of u1testutils to 80.
- Unified login/logout template rendering mechanism between ubuntu and launchpad.

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

You have done a huge amount of work. Thank you very much!
I like the data-qa-ids you are using, as they make more readable the tests helpers. Thanks for that too.

Some comments:

286 +for i, token in enumerate((TOKEN_1, TOKEN_2, TOKEN_3)):
287 + assert_text_contains(applications[i + 1], token)

Here, I suppose we are not checking the first application because it's the one added when creating the account. A comment about this will be nice to make it easier to understand the test in the case of a failure.

333 + if device_names is None:
334 + device_names = ['2F Required Generic Device']

Can you please explain this change to me? I thought having a default value for devices names would make it faster to understand. It's not a complaint, I'm just wondering if this is the style we should follow.

402 +if helpers.get_current_brand() == 'launchpad':
403 + click_button(logout_element)
404 +else:
405 + click_link(logout_element)

Maybe this can be changed to click_element(logout_element) and we can remove the if. From the user point of view, I think it's not important if it's a link or a button. With CSS we make some buttons look like links and also the other way around.

473 +# wait for animation
474 +sleep(0.5)

I don't like this. Maybe we can wait for the element to be visible, or do some other trick. I'm now used with fighting animations, so feel free to open a bug and assign it to me with low priority. I'll take a look when I'm bored waiting for runs.

540 \ No newline at end of file

A newline here would be nice.

731 + self.assertEqual(button.text_content().strip(), 'Yes, log me in')

Here it would be nice if you comment why the content has to be stripped.

844 + <a href="./+remove-email?id={{ email.id }}" class="btn-sm" data-qa-id="remove_verified_email">
845 + <span>{% trans "Delete" %}</span>
846 + </a>

Shouldn't this be indented one more level, because it's inside the if?

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

> You have done a huge amount of work. Thank you very much!
> I like the data-qa-ids you are using, as they make more readable the tests
> helpers. Thanks for that too.

:-)

> 286 +for i, token in enumerate((TOKEN_1, TOKEN_2, TOKEN_3)):
> 287 + assert_text_contains(applications[i + 1], token)
>
> Here, I suppose we are not checking the first application because it's the one
> added when creating the account. A comment about this will be nice to make it
> easier to understand the test in the case of a failure.

Yes, comment added.

> 333 + if device_names is None:
> 334 + device_names = ['2F Required Generic Device']
>
> Can you please explain this change to me? I thought having a default value for
> devices names would make it faster to understand. It's not a complaint, I'm
> just wondering if this is the style we should follow.

Followed up in the irc channel, but basically we need to avoid having mutable objects as default value for parameters.

> 402 +if helpers.get_current_brand() == 'launchpad':
> 403 + click_button(logout_element)
> 404 +else:
> 405 + click_link(logout_element)
>
> Maybe this can be changed to click_element(logout_element) and we can remove
> the if. From the user point of view, I think it's not important if it's a link
> or a button. With CSS we make some buttons look like links and also the other
> way around.

Done!

> 473 +# wait for animation
> 474 +sleep(0.5)
>
> I don't like this. Maybe we can wait for the element to be visible, or do some
> other trick. I'm now used with fighting animations, so feel free to open a bug
> and assign it to me with low priority. I'll take a look when I'm bored waiting
> for runs.

Done, LP: #1190411.

> 540 \ No newline at end of file
>
> A newline here would be nice.

Is added now (the "No newline at end of file" refers to the old version of the file).

> 731 + self.assertEqual(button.text_content().strip(), 'Yes, log me in')
>
> Here it would be nice if you comment why the content has to be stripped.

Added!

> 844 + <a href="./+remove-email?id={{ email.id }}" class="btn-sm" data-qa-
> id="remove_verified_email">
> 845 + <span>{% trans "Delete" %}</span>
> 846 + </a>
>
> Shouldn't this be indented one more level, because it's inside the if?

It is already indented... perhaps am I missing something?

Thanks for all the time you out on this!

Revision history for this message
Leo Arias (elopio) wrote :

land land land.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'acceptance/actions/subheader.py'
2--- acceptance/actions/subheader.py 2013-05-13 07:41:43 +0000
3+++ acceptance/actions/subheader.py 2013-06-13 00:15:30 +0000
4@@ -2,27 +2,33 @@
5
6
7 def _assert_full_name_in_account_link(full_name):
8- sst.actions.assert_text(_get_my_account_link(), full_name[:40])
9+ sst.actions.assert_text(_get_my_account_section(), full_name[:40])
10+
11+
12+def _get_my_account_section():
13+ return sst.actions.get_element_by_css(
14+ '*[data-qa-id="account"] *[data-qa-id="user_name"]')
15
16
17 def _get_my_account_link():
18- return sst.actions.get_element(id='account')
19+ return sst.actions.get_element_by_css('*[data-qa-id="account_link"]')
20
21
22 def _get_devices_link():
23- return sst.actions.get_element(id='devices-link')
24+ return sst.actions.get_element_by_css('*[data-qa-id="devices_link"]')
25
26
27 def _get_applications_link():
28- return sst.actions.get_element(id='applications-link')
29+ return sst.actions.get_element_by_css('*[data-qa-id="applications_link"]')
30
31
32 def _get_log_out_link():
33- return sst.actions.get_element(id='logout-link')
34+ return sst.actions.get_element_by_css('*[data-qa-id="logout_link"]')
35
36
37 def assert_log_in(full_name):
38 _assert_full_name_in_account_link(full_name)
39+ _get_my_account_link()
40 _get_log_out_link()
41
42
43
44=== modified file 'acceptance/helpers.py'
45--- acceptance/helpers.py 2013-05-17 20:45:52 +0000
46+++ acceptance/helpers.py 2013-06-13 00:15:30 +0000
47@@ -328,3 +328,23 @@
48
49 link = match.groups()[0]
50 return link
51+
52+
53+# this is a temporarly helper so we can detect brands at UI rendering time
54+# since we can not access flags properly from within the acceptance run
55+def get_current_brand():
56+ try:
57+ get_element_by_css('*[data-qa-id="brand_ubuntuone"]')
58+ except:
59+ pass
60+ else:
61+ return 'ubuntuone'
62+
63+ try:
64+ get_element_by_css('*[data-qa-id="brand_launchpad"]')
65+ except:
66+ pass
67+ else:
68+ return 'launchpad'
69+
70+ return 'ubuntu'
71
72=== modified file 'acceptance/pages.py'
73--- acceptance/pages.py 2013-06-08 06:26:43 +0000
74+++ acceptance/pages.py 2013-06-13 00:15:30 +0000
75@@ -20,18 +20,14 @@
76 self.menu = Menu()
77
78 def get_user_name(self):
79- try:
80- # This is present on the ubuntuone and launchpad templates.
81- user_name_element = sst.actions.get_element_by_css(
82- '*[data-qa-id="user_name"]')
83- except AssertionError:
84- # This is present on the ubuntu template.
85- user_name_element = sst.actions.get_element(id='account')
86+ user_name_element = sst.actions.get_element_by_css(
87+ '*[data-qa-id="user_name"]')
88 return user_name_element.text
89
90 @log_action(logging.info)
91 def log_out(self):
92- sst.actions.click_link('logout-link')
93+ link = sst.actions.get_element_by_css('*[data-qa-id="logout_link"]')
94+ sst.actions.click_link(link)
95 return YouHaveBeenLoggedOut()
96
97
98@@ -40,12 +36,14 @@
99
100 @log_action(logging.info)
101 def go_to_authentication_devices(self):
102- sst.actions.click_link('devices-link')
103+ link = sst.actions.get_element_by_css('*[data-qa-id="devices_link"]')
104+ sst.actions.click_link(link)
105 return YourAuthenticationDevices()
106
107 @log_action(logging.info)
108 def go_to_your_account(self):
109- sst.actions.click_link('account-link')
110+ link = sst.actions.get_element_by_css('*[data-qa-id="account_link"]')
111+ sst.actions.click_link(link)
112 return YourAccount()
113
114
115@@ -144,7 +142,8 @@
116
117 @log_action(logging.info)
118 def click_log_in_or_create_account(self):
119- sst.actions.click_link('login-link')
120+ link = sst.actions.get_element_by_css('*[data-qa-id="login_link"]')
121+ sst.actions.click_link(link)
122 return LogIn()
123
124
125@@ -186,7 +185,8 @@
126 @log_action(logging.info)
127 def add_email(self, email_address):
128 sst.actions.write_textfield('id_newemail', email_address)
129- sst.actions.click_button(sst.actions.get_element(name='continue'))
130+ sst.actions.click_button(
131+ sst.actions.get_element_by_css('*[data-qa-id="add_new_email"]'))
132
133 @log_action(logging.info)
134 def delete_email(self):
135@@ -212,7 +212,8 @@
136 sst.actions.write_textfield('id_email', email_address)
137
138 def _continue(self):
139- sst.actions.click_button(sst.actions.get_element(name='continue'))
140+ sst.actions.click_button(sst.actions.get_element_by_css(
141+ '*[data-qa-id="confirm_enter_token"]'))
142
143 @log_action(logging.info)
144 def confirm_with_error(self, confirmation_code, email_address):
145@@ -223,12 +224,13 @@
146
147 class DeleteEmail(LoggedUserPage):
148
149+ url_path = '/+remove-email'
150 qa_anchor = 'delete_email'
151- url_path = '/+remove-email'
152
153 @log_action(logging.info)
154 def confirm(self):
155- confirm_button = sst.actions.get_element(name='delete')
156+ confirm_button = sst.actions.get_element_by_css(
157+ '*[data-qa-id="confirm_delete_email"]')
158 sst.actions.click_button(confirm_button)
159 return YourEmailAddresses()
160
161@@ -244,7 +246,8 @@
162 # Even though the recaptcha field is ignored for our tests, we do
163 # want to verify that it is on the page.
164 sst.actions.write_textfield('recaptcha_response_field', 'ignored')
165- sst.actions.click_button(sst.actions.get_element(name='continue'))
166+ sst.actions.click_button(sst.actions.get_element_by_css(
167+ '*[data-qa-id="send_password_reset_token"]'))
168
169
170 class LogInFromRedirect(u1testutils.sso.sst.pages.LogIn):
171@@ -279,17 +282,17 @@
172 return AddNewAuthenticationDevice()
173
174 @log_action(logging.info)
175- def delete_authentication_device(self, index=0):
176+ def delete_authentication_device(self, device_index=0):
177 delete_link = sst.actions.get_elements_by_css(
178 '*[data-qa-id="delete_device"]')
179- sst.actions.click_link(delete_link[index])
180+ sst.actions.click_link(delete_link[device_index])
181 return DeleteAuthenticationDevice()
182
183 @log_action(logging.info)
184- def rename_authentication_device(self, index=0):
185+ def rename_authentication_device(self, device_index=0):
186 rename_link = sst.actions.get_elements_by_css(
187 '*[data-qa-id="rename_device"]')
188- sst.actions.click_link(rename_link[index])
189+ sst.actions.click_link(rename_link[device_index])
190 return RenameAuthenticationDevice()
191
192 def is_warning_displayed(self):
193@@ -369,7 +372,8 @@
194
195 @log_action(logging.info)
196 def cancel(self):
197- cancel_link = sst.actions.get_element_by_css('*[data-qa-id="cancel"]')
198+ cancel_link = sst.actions.get_element_by_css(
199+ '*[data-qa-id="cancel_add_device_from_type"]')
200 sst.actions.click_link(cancel_link)
201 return YourAuthenticationDevices()
202
203@@ -411,8 +415,8 @@
204
205 def _add_device(self, device_radio_identifier):
206 sst.actions.set_radio_value(device_radio_identifier)
207- add_button = sst.actions.get_element(
208- tag='button', text_regex='Add device')
209+ add_button = sst.actions.get_element_by_css(
210+ '*[data-qa-id="add_device_from_type"]')
211 sst.actions.click_button(add_button)
212
213
214@@ -436,7 +440,7 @@
215
216 def _click_add_device(self):
217 add_button = sst.actions.get_element_by_css(
218- '*[data-qa-id="add_generic_device"]')
219+ '*[data-qa-id="confirm_add_device"]')
220 sst.actions.click_button(add_button)
221
222 @log_action(logging.info)
223@@ -471,7 +475,8 @@
224
225 @log_action(logging.info)
226 def cancel(self):
227- cancel_link = sst.actions.get_element_by_css('*[data-qa-id="cancel"]')
228+ cancel_link = sst.actions.get_element_by_css(
229+ '*[data-qa-id="cancel_add_device"]')
230 sst.actions.click_link(cancel_link)
231 return YourAuthenticationDevices()
232
233@@ -550,12 +555,12 @@
234 # TODO This test is really small and gives no real value to a user, so it's
235 # a perfect candidate to be converted into a django unit test.
236 def assert_print_button_visible(self):
237- sst.actions.assert_element('*[data-qa-id="print_btn"]')
238+ sst.actions.assert_element('*[data-qa-id="print_codes"]')
239
240 @log_action(logging.info)
241 def go_back_to_device_list(self):
242 device_list_link = sst.actions.get_element_by_css(
243- '*[data-qa-id="go_back"]')
244+ '*[data-qa-id="cancel_print_codes"]')
245 sst.actions.click_link(device_list_link)
246 return YourAuthenticationDevices()
247
248@@ -587,13 +592,14 @@
249 @log_action(logging.info)
250 def confirm_new_codes(self):
251 confirm_button = sst.actions.get_element_by_css(
252- '*[data-qa-id="confirm-codes"]')
253+ '*[data-qa-id="confirm_new_codes"]')
254 sst.actions.click_button(confirm_button)
255 return PaperDevice()
256
257 @log_action(logging.info)
258 def cancel(self):
259- cancel_link = sst.actions.get_element_by_css('*[data-qa-id="cancel"]')
260+ cancel_link = sst.actions.get_element_by_css(
261+ '*[data-qa-id="cancel_new_codes"]')
262 sst.actions.click_link(cancel_link)
263 return PaperDevice()
264
265
266=== modified file 'acceptance/tests/applications/create_multiple_apps.py'
267--- acceptance/tests/applications/create_multiple_apps.py 2013-05-02 17:20:14 +0000
268+++ acceptance/tests/applications/create_multiple_apps.py 2013-06-13 00:15:30 +0000
269@@ -9,6 +9,7 @@
270 from sst.actions import (
271 assert_text_contains,
272 get_base_url,
273+ get_elements_by_css,
274 go_to,
275 )
276 from u1testutils.sst import config
277@@ -49,6 +50,8 @@
278 # Now log in and check that the apps are associated with the account.
279 helpers.login(email_address, PASSWORD)
280 go_to(urls.APPLICATIONS)
281-assert_text_contains('content', 'chupacabra')
282-assert_text_contains('content', "leviathan")
283-assert_text_contains('content', "behemoth")
284+
285+applications = get_elements_by_css('*[data-qa-id="application_token"]')
286+for i, token in enumerate((TOKEN_1, TOKEN_2, TOKEN_3)):
287+ # skip the first token which is the "web login" token
288+ assert_text_contains(applications[i + 1], token)
289
290=== modified file 'acceptance/tests/applications/delete_app.py'
291--- acceptance/tests/applications/delete_app.py 2013-05-16 15:09:51 +0000
292+++ acceptance/tests/applications/delete_app.py 2013-06-13 00:15:30 +0000
293@@ -8,7 +8,7 @@
294 click_button,
295 fails,
296 get_base_url,
297- get_elements,
298+ get_elements_by_css,
299 go_to,
300 )
301 from u1testutils.sst import config
302@@ -41,12 +41,16 @@
303 # now test that the app is there and that we can delete it
304 helpers.login(email_address, PASSWORD)
305 go_to(urls.APPLICATIONS)
306-assert_text_contains('content', TOKEN_NAME)
307-delete_buttons = get_elements(css_class='btn-sm', name='Delete')
308+token_names = get_elements_by_css('*[data-qa-id="application_token"]')
309+assert_text_contains(token_names[-1], TOKEN_NAME)
310+delete_buttons = get_elements_by_css('*[data-qa-id="delete_application"]')
311 # delete application token
312-click_button(delete_buttons[0])
313+click_button(delete_buttons[-1])
314 # log back in and should have no app
315 helpers.logout()
316 helpers.login(email_address, PASSWORD)
317+
318 go_to(urls.APPLICATIONS)
319-fails(assert_text_contains, 'content', TOKEN_NAME)
320+token_names = get_elements_by_css('*[data-qa-id="application_token"]')
321+for token_name in token_names:
322+ fails(assert_text_contains, token_name, TOKEN_NAME)
323
324=== modified file 'acceptance/tests/devices/__init__.py'
325--- acceptance/tests/devices/__init__.py 2013-06-07 21:07:00 +0000
326+++ acceptance/tests/devices/__init__.py 2013-06-13 00:15:30 +0000
327@@ -77,8 +77,10 @@
328
329 class TwoFactorPageOpenedWithTwoFactorRequired(fixtures.Fixture):
330
331- def __init__(self, device_names=['2F Required Generic Device'], user=None):
332+ def __init__(self, device_names=None, user=None):
333 super(TwoFactorPageOpenedWithTwoFactorRequired, self).__init__()
334+ if device_names is None:
335+ device_names = ['2F Required Generic Device']
336 self.device_names = device_names
337 self.user = user
338
339
340=== removed directory 'acceptance/tests/devices/scripts'
341=== modified file 'acceptance/tests/devices/testcases/test_device_login.py'
342--- acceptance/tests/devices/testcases/test_device_login.py 2013-06-10 18:47:00 +0000
343+++ acceptance/tests/devices/testcases/test_device_login.py 2013-06-13 00:15:30 +0000
344@@ -2,11 +2,11 @@
345 # This software is licensed under the GNU Affero General Public License
346 # version 3 (see the file LICENSE).
347
348+import sst.actions
349+
350 from acceptance import base, pages
351 from acceptance.tests import devices
352
353-import sst.actions
354-
355
356 class TestDeviceLogin(base.SSTTestCaseWithLogIn):
357
358
359=== modified file 'acceptance/tests/logout/logout_deep_pages.py'
360--- acceptance/tests/logout/logout_deep_pages.py 2013-05-15 11:42:01 +0000
361+++ acceptance/tests/logout/logout_deep_pages.py 2013-06-13 00:15:30 +0000
362@@ -16,8 +16,6 @@
363 click_delete_button,
364 )
365
366-from identityprovider.utils import get_current_brand
367-
368
369 config.set_base_url_from_env()
370
371@@ -37,9 +35,7 @@
372 # logout by clicking on link
373 click_link('logout-link')
374
375-# no link present in ubuntuone brand
376-if get_current_brand() != 'ubuntuone':
377- assert_element(href="/+login")
378+assert_element(href="/+login")
379
380 # make sure we're logged out
381 go_to(urls.HOME)
382
383=== modified file 'acceptance/tests/logout/logout_ubuntu.py'
384--- acceptance/tests/logout/logout_ubuntu.py 2013-06-05 17:09:49 +0000
385+++ acceptance/tests/logout/logout_ubuntu.py 2013-06-13 00:15:30 +0000
386@@ -5,7 +5,7 @@
387 assert_element,
388 assert_title,
389 click_button,
390- click_link,
391+ click_element,
392 get_element_by_css,
393 go_to,
394 write_textfield,
395@@ -14,8 +14,6 @@
396
397 from acceptance import urls
398
399-from identityprovider.utils import get_current_brand
400-
401
402 # Set to Production, Staging, VPS, Developer etc..
403 config.set_base_url_from_env()
404@@ -27,11 +25,10 @@
405 click_button(get_element_by_css('*[data-qa-id="login_button"]'))
406
407 # logout by clicking on link
408-click_link('logout-link')
409+logout_element = get_element_by_css('*[data-qa-id="logout_link"]')
410+click_element(logout_element)
411
412-# no link present in ubuntuone brand
413-if get_current_brand() != 'ubuntuone':
414- assert_element(href="/+login")
415+assert_element(href="/+login")
416
417 # make sure we're logged out
418 go_to(urls.HOME)
419@@ -45,9 +42,7 @@
420 # logout by hitting url directly
421 go_to(urls.LOGOUT)
422
423-# no link present in ubuntuone brand
424-if get_current_brand() != 'ubuntuone':
425- assert_element(href="/+login")
426+assert_element(href="/+login")
427
428 # make sure we're logged out
429 go_to(urls.HOME)
430
431=== modified file 'acceptance/tests/new_account/passwords_bad_client-side.csv'
432--- acceptance/tests/new_account/passwords_bad_client-side.csv 2012-03-06 13:10:19 +0000
433+++ acceptance/tests/new_account/passwords_bad_client-side.csv 2013-06-13 00:15:30 +0000
434@@ -1,6 +1,6 @@
435 password^error
436 'foo'^'Password too short'
437-'foobar123'^'Strength: good'
438 'Foo123'^'Password too short'
439 ' '^'Password too short'
440 '12345678'^'Strength: fair'
441+'aA12_3555aA'^'Strength: strong'
442
443=== modified file 'acceptance/tests/new_account/passwords_bad_client-side.py'
444--- acceptance/tests/new_account/passwords_bad_client-side.py 2013-05-14 13:17:20 +0000
445+++ acceptance/tests/new_account/passwords_bad_client-side.py 2013-06-13 00:15:30 +0000
446@@ -6,20 +6,15 @@
447 assert_text,
448 assert_title,
449 assert_url,
450- get_element,
451+ get_element_by_css,
452 go_to,
453- skip,
454+ sleep,
455 write_textfield,
456 )
457 from u1testutils.sst import config
458
459 from acceptance import urls
460
461-from identityprovider.utils import get_current_brand
462-
463-
464-if get_current_brand() == 'ubuntuone':
465- skip('Test not compatible with ubuntuone brand')
466
467 config.set_base_url_from_env()
468
469@@ -27,7 +22,11 @@
470 assert_url(urls.NEW_ACCOUNT)
471 assert_title('Create account')
472
473-elem = get_element(id='password_strength')
474+elem = get_element_by_css('*[data-qa-id="password_strength"]')
475
476 write_textfield('id_password', password)
477+
478+# wait for animation
479+sleep(0.5)
480+
481 assert_text(elem, error)
482
483=== removed file 'acceptance/tests/new_account/passwords_bad_client-side_ubuntuone.csv'
484--- acceptance/tests/new_account/passwords_bad_client-side_ubuntuone.csv 2013-05-10 10:13:09 +0000
485+++ acceptance/tests/new_account/passwords_bad_client-side_ubuntuone.csv 1970-01-01 00:00:00 +0000
486@@ -1,6 +0,0 @@
487-password^error
488-'fooo'^'Password too short'
489-'foobar123'^'Strength: fair'
490-'Foo123'^'Password too short'
491-'12345678'^'Strength: weak'
492-'aA12_3555aA'^'Strength: strong'
493
494=== removed file 'acceptance/tests/new_account/passwords_bad_client-side_ubuntuone.py'
495--- acceptance/tests/new_account/passwords_bad_client-side_ubuntuone.py 2013-05-15 09:38:24 +0000
496+++ acceptance/tests/new_account/passwords_bad_client-side_ubuntuone.py 1970-01-01 00:00:00 +0000
497@@ -1,38 +0,0 @@
498-# password tests: client-side validation
499-#
500-# rules:
501-# Password must be at least 8 characters long.
502-from sst.actions import (
503- assert_text,
504- assert_title,
505- assert_url,
506- get_element_by_css,
507- go_to,
508- skip,
509- sleep,
510- write_textfield,
511-)
512-from u1testutils.sst import config
513-
514-from acceptance import urls
515-
516-from identityprovider.utils import get_current_brand
517-
518-
519-if get_current_brand() != 'ubuntuone':
520- skip('Test only compatible with ubuntuone brand')
521-
522-config.set_base_url_from_env()
523-
524-go_to(urls.NEW_ACCOUNT)
525-assert_url(urls.NEW_ACCOUNT)
526-assert_title('Create account')
527-
528-elem = get_element_by_css('.yui3-passwordmeter-indicatorNode p')
529-
530-write_textfield('id_password', password)
531-
532-# wait for animation
533-sleep(1)
534-
535-assert_text(elem, error)
536
537=== modified file 'acceptance/tests/new_account/passwords_bad_server-side.csv'
538--- acceptance/tests/new_account/passwords_bad_server-side.csv 2012-12-18 20:15:44 +0000
539+++ acceptance/tests/new_account/passwords_bad_server-side.csv 2013-06-13 00:15:30 +0000
540@@ -1,4 +1,4 @@
541 password
542 foo
543 Foo123
544-""
545\ No newline at end of file
546+" "
547
548=== modified file 'acceptance/tests/new_account/passwords_bad_server-side.py'
549--- acceptance/tests/new_account/passwords_bad_server-side.py 2013-05-14 13:17:20 +0000
550+++ acceptance/tests/new_account/passwords_bad_server-side.py 2013-06-13 00:15:30 +0000
551@@ -3,12 +3,12 @@
552 # rules:
553 # Password must be at least 8 characters long.
554 from sst.actions import (
555- assert_attribute,
556 assert_text,
557+ assert_text_contains,
558 assert_title,
559 assert_url,
560 click_button,
561- get_element,
562+ get_element_by_css,
563 go_to,
564 )
565 from u1testutils import mail
566@@ -16,8 +16,6 @@
567
568 from acceptance import helpers, urls
569
570-from identityprovider.utils import get_current_brand
571-
572
573 EMAIL = mail.make_unique_test_email_address()
574 NAME = 'Some Name'
575@@ -26,15 +24,11 @@
576 go_to(urls.NEW_ACCOUNT)
577 assert_title('Create account')
578 helpers.fill_registration_form(EMAIL, displayname=NAME, password=password)
579-click_button(get_element(name='continue'))
580+click_button(get_element_by_css('*[data-qa-id="register_button"]'))
581
582 assert_url(urls.NEW_ACCOUNT)
583 assert_text('id_displayname', NAME)
584 assert_text('id_email', EMAIL)
585
586-if get_current_brand() == 'ubuntuone':
587- msg = 'Password with at least 8 characters'
588- assert_attribute('id_password', 'placeholder', msg)
589-else:
590- msg = 'Password must be at least 8 characters long.'
591- assert_text(get_element(css_class='formHelp'), msg)
592+msg = 'at least 8 characters'
593+assert_text_contains(get_element_by_css('span.error'), msg)
594
595=== modified file 'acceptance/tests/root/links.py'
596--- acceptance/tests/root/links.py 2013-05-14 13:17:20 +0000
597+++ acceptance/tests/root/links.py 2013-06-13 00:15:30 +0000
598@@ -12,9 +12,7 @@
599 )
600 from u1testutils.sst import config
601
602-from acceptance import urls
603-
604-from identityprovider.utils import get_current_brand
605+from acceptance import helpers, urls
606
607
608 config.set_base_url_from_env()
609@@ -22,9 +20,9 @@
610 go_to(urls.HOME)
611 wait_for(assert_title, 'Log in')
612
613-if get_current_brand() == 'ubuntuone':
614+if helpers.get_current_brand() == 'ubuntuone':
615 links = (
616- ('Terms of use', 'https://one.ubuntu.com/terms/'),
617+ ('Terms of service', 'https://one.ubuntu.com/terms/'),
618 ('Privacy', 'https://one.ubuntu.com/privacy/'),
619 ('Login support', 'https://forms.canonical.com/sso-support/'),
620 ('Choose your language', urls.get_base_url() + '/set_language'),
621
622=== modified file 'requirements/testing.txt'
623--- requirements/testing.txt 2013-06-05 17:11:48 +0000
624+++ requirements/testing.txt 2013-06-13 00:15:30 +0000
625@@ -31,5 +31,5 @@
626 zope.schema==4.2.0
627 zope.testbrowser==3.5.1
628 bzr+http://bazaar.launchpad.net/~canonical-isd-qa/selenium-simple-test/trunk/@413
629-bzr+http://bazaar.launchpad.net/~canonical-isd-hackers/u1-test-utils/trunk@78
630+bzr+http://bazaar.launchpad.net/~canonical-isd-hackers/u1-test-utils/trunk@80
631 bzr+ssh://bazaar.launchpad.net/~bloodearnest/+junk/test-email-server/
632
633=== modified file 'scripts/acceptance-dev.sh'
634--- scripts/acceptance-dev.sh 2013-06-11 11:04:05 +0000
635+++ scripts/acceptance-dev.sh 2013-06-13 00:15:30 +0000
636@@ -24,7 +24,7 @@
637
638 while getopts ":b:t:hfcp:" opt; do
639 case $opt in
640- b) BRAND="brand:"$OPTARG ;;
641+ b) BRAND=$OPTARG ;;
642 t) TESTCASE=$OPTARG ;;
643 h) HEADLESS="true" ;;
644 f) HEADLESS="false" ;;
645@@ -68,6 +68,11 @@
646 fab manage:add_openid_rp_config,$SST_BASE_URL/consumer,--allow-unverified,--allowed-user-attribs="fullname\,nickname\,email\,language,account_verified"
647 fi
648
649+if [ $BRAND ]; then
650+ fab manage:add_switch,"brand_"$BRAND
651+ BRAND="brand:"$BRAND
652+fi
653+
654 # handle exit cleanly (mainly Ctrl-C)
655 trap clean_up SIGHUP SIGINT SIGTERM
656
657
658=== modified file 'scripts/run-acceptance-tests'
659--- scripts/run-acceptance-tests 2013-06-11 10:14:59 +0000
660+++ scripts/run-acceptance-tests 2013-06-13 00:15:30 +0000
661@@ -47,6 +47,9 @@
662 if [ ${TARGET} = "dev" ]; then
663 # dev is special: we need to start it up.
664 ./scripts/acceptance-dev.sh
665+if [ ${TARGET} = "dev-u1" ]; then
666+ # dev is special: we need to start it up.
667+ ./scripts/acceptance-dev.sh -b ubuntuone
668 else
669 SST_BASE_URL="$SST_BASE_URL" fab acceptance:screenshot=true,report=xml
670 fi
671
672=== modified file 'src/identityprovider/media/ubuntu/styles.css'
673--- src/identityprovider/media/ubuntu/styles.css 2013-05-22 14:13:01 +0000
674+++ src/identityprovider/media/ubuntu/styles.css 2013-06-13 00:15:30 +0000
675@@ -606,7 +606,8 @@
676 color: #dd4814;
677 }
678
679-#subheader ul li a, #subheader ul li span, #subheader ul li input {
680+#subheader ul li span,
681+#subheader ul li input {
682 padding: 14px 8px 0;
683 display: block;
684 height: 28px;
685
686=== modified file 'src/identityprovider/templates/server/decide.html'
687--- src/identityprovider/templates/server/decide.html 2013-06-04 16:35:37 +0000
688+++ src/identityprovider/templates/server/decide.html 2013-06-13 00:15:30 +0000
689@@ -17,7 +17,9 @@
690 {% block content %}
691 <div id="trust-root">
692 <h2 class="main" data-qa-id="rp_login_title">
693- {% blocktrans %} You are logging in to <a data-qa-id="rp_backlink" href="{{ trust_root }}">{{ trust_root }}</a>{% endblocktrans %}
694+ {% blocktrans %} You are logging in to
695+ <a data-qa-id="rp_backlink" href="{{ trust_root }}">{{ trust_root }}</a>
696+ {% endblocktrans %}
697 </h2>
698 </div>
699
700@@ -62,7 +64,9 @@
701
702 <p>
703 <input type="hidden" name="ok" />
704- <button type="submit" class="btn" name="yes" data-qa-id="rp_confirm_login"><span><span>{% trans "Yes, log me in" %}</span></span></button>
705+ <button type="submit" class="btn" name="yes" data-qa-id="rp_confirm_login">
706+ <span><span>{% trans "Yes, log me in" %}</span></span>
707+ </button>
708 {% trans "or" %}
709 <a href="+cancel">{% trans "cancel" %}</a>
710 </p>
711
712=== modified file 'src/identityprovider/templatetags/menu_item.py'
713--- src/identityprovider/templatetags/menu_item.py 2010-07-12 21:23:42 +0000
714+++ src/identityprovider/templatetags/menu_item.py 2013-06-13 00:15:30 +0000
715@@ -7,8 +7,9 @@
716
717
718 @register.inclusion_tag('menu_item.html', takes_context=True)
719-def menu_item(context, section, label, link):
720+def menu_item(context, section, label, link, extra_qa_data_id=None):
721 return {'current_section': context.get('current_section', None),
722 'section': section,
723 'label': label,
724- 'link': link}
725+ 'link': link,
726+ 'extra_qa_data_id': extra_qa_data_id}
727
728=== modified file 'src/identityprovider/tests/test_views_server.py'
729--- src/identityprovider/tests/test_views_server.py 2013-05-21 19:05:32 +0000
730+++ src/identityprovider/tests/test_views_server.py 2013-06-13 00:15:30 +0000
731@@ -1066,6 +1066,8 @@
732 trust_root = tree.find('div#trust-root')
733 self.assertEqual(len(trust_root), 1)
734 trust_root = trust_root[0]
735+ # we need to strip the element text to avoid having a test failure
736+ # caused by newlines inside the html template
737 self.assertEqual(trust_root[0].text.strip(), 'You are logging in to')
738
739 link = trust_root.getchildren()[0].find('a')
740@@ -1074,7 +1076,7 @@
741 button = tree.find('button[type="submit"][name="yes"]')
742 self.assertEqual(len(button), 1)
743 button = button[0]
744- self.assertEqual(button.text_content(), 'Yes, log me in')
745+ self.assertEqual(button.text_content().strip(), 'Yes, log me in')
746
747 def test_user_unverified_no_rpconfig(self):
748 assert OpenIDRPConfig.objects.count() == 0
749
750=== modified file 'src/webui/templates/account/applications.html'
751--- src/webui/templates/account/applications.html 2013-04-17 13:23:35 +0000
752+++ src/webui/templates/account/applications.html 2013-06-13 00:15:30 +0000
753@@ -12,7 +12,6 @@
754 <h1 class="main">{% trans "Applications you use" %}</h1>
755 {% endblock %}
756
757-
758 {% block content %}
759 {% if tokens %}
760 <p>
761@@ -31,13 +30,13 @@
762 <tbody>
763 {% for token in tokens %}
764 <tr>
765- <td>{{ token.name }}</td>
766+ <td data-qa-id="application_token">{{ token.name }}</td>
767 <td>{{ token.created_at|date:"Y-m-d" }}</td>
768 <td class="actions">
769 <form action="{% url 'applications' %}" method="post">
770 {% csrf_token %}
771 <input type="hidden" name="token_id" value="{{ token.token }}" />
772- <button type="submit" class="btn-sm" name="Delete">
773+ <button type="submit" class="btn-sm" name="Delete" data-qa-id="delete_application">
774 <span>{% trans "Delete" %}</span>
775 </button>
776 </form>
777
778=== modified file 'src/webui/templates/account/confirm_email_invalidation.html'
779--- src/webui/templates/account/confirm_email_invalidation.html 2013-02-22 20:30:24 +0000
780+++ src/webui/templates/account/confirm_email_invalidation.html 2013-06-13 00:15:30 +0000
781@@ -21,7 +21,9 @@
782 <form action="" method="POST">
783 {% csrf_token %}
784 <p>
785- <button type="submit" class="btn" name="invalidate"><span><span>{% trans "Yes, invalidate" %}</span></span></button>
786+ <button type="submit" class="btn" name="invalidate" data-qa-id="confirm_email_invalidation">
787+ <span><span>{% trans "Yes, invalidate" %}</span></span>
788+ </button>
789 {% trans "or" %} {% include "common/cancel_link.html" %}
790 </p>
791 </form>
792
793=== modified file 'src/webui/templates/account/confirm_new_email.html'
794--- src/webui/templates/account/confirm_new_email.html 2013-05-31 03:30:26 +0000
795+++ src/webui/templates/account/confirm_new_email.html 2013-06-13 00:15:30 +0000
796@@ -26,11 +26,11 @@
797 {% csrf_token %}
798 <p>
799 <input type="hidden" name="post" value="yes" />
800- <button type="submit" name="continue" class="btn">
801+ <button type="submit" name="continue" class="btn" data-qa-id="confirm_email_validation">
802 <span><span>{% trans "Yes, I'm sure" %}</span></span>
803 </button>
804 {% trans "or" %}
805- <a href="{% if token %}/{{ token }}{% endif %}/">{% trans "cancel" %}</a>
806+ <a href="{% if token %}/{{ token }}{% endif %}/" data-qa-id="cancel_email_validation">{% trans "cancel" %}</a>
807 </p>
808 </form>
809 </div>
810
811=== modified file 'src/webui/templates/account/delete_email.html'
812--- src/webui/templates/account/delete_email.html 2013-05-31 03:13:32 +0000
813+++ src/webui/templates/account/delete_email.html 2013-06-13 00:15:30 +0000
814@@ -2,7 +2,7 @@
815 {% load i18n %}
816
817 {% comment %}
818-Copyright 2010 Canonical Ltd. This software is licensed under the
819+Copyright 2010-2013 Canonical Ltd. This software is licensed under the
820 GNU Affero General Public License version 3 (see the file LICENSE).
821 {% endcomment %}
822
823@@ -26,7 +26,9 @@
824 <form action="" method="POST">
825 {% csrf_token %}
826 <p>
827- <button type="submit" class="btn" name="delete"><span><span>{% trans "Yes, delete" %}</span></span></button>
828+ <button type="submit" class="btn" name="delete" data-qa-id="confirm_delete_email">
829+ <span><span>{% trans "Yes, delete" %}</span></span>
830+ </button>
831 {% trans "or" %}
832 {% include "common/cancel_link.html" %}
833 </p>
834
835=== modified file 'src/webui/templates/account/edit.html'
836--- src/webui/templates/account/edit.html 2013-06-07 03:39:56 +0000
837+++ src/webui/templates/account/edit.html 2013-06-13 00:15:30 +0000
838@@ -145,7 +145,9 @@
839
840 <p class="actions">
841 {% if not readonly %}
842- <button type="submit" class="btn" name="update" data-qa-id="update_preferences"><span><span>{% trans "Update" %}</span></span></button>
843+ <button type="submit" class="btn" name="update" data-qa-id="update_preferences">
844+ <span><span>{% trans "Update" %}</span></span>
845+ </button>
846 {% endif %}
847 {% if token %}
848 {% trans "or" %}
849
850=== modified file 'src/webui/templates/account/emails.html'
851--- src/webui/templates/account/emails.html 2013-05-15 11:07:23 +0000
852+++ src/webui/templates/account/emails.html 2013-06-13 00:15:30 +0000
853@@ -51,7 +51,9 @@
854 {% if not readonly %}
855 <td class="actions">
856 {% if not email.is_preferred %}
857- <a href="./+remove-email?id={{ email.id }}" class="btn-sm" data-qa-id="remove_verified_email"><span>{% trans "Delete" %}</span></a>
858+ <a href="./+remove-email?id={{ email.id }}" class="btn-sm" data-qa-id="remove_verified_email">
859+ <span>{% trans "Delete" %}</span>
860+ </a>
861 {% endif %}
862 </td>
863 {% endif %}
864@@ -74,7 +76,9 @@
865 {% if email.is_verifiable %}
866 <a href="./+verify-email?id={{ email.id }}" data-qa-id="verify_unverified_{{ email }}" class="verify-email btn-sm"><span>{% trans "Verify" %}</span></a>
867 {% endif %}
868- <a href="./+remove-email?id={{ email.id }}" data-qa-id="delete_unverified_{{ email }}" class="btn-sm"><span>{% trans "Delete" %}</span></a>
869+ <a href="./+remove-email?id={{ email.id }}" data-qa-id="delete_unverified_{{ email }}" class="btn-sm">
870+ <span>{% trans "Delete" %}</span>
871+ </a>
872 </td>
873 {% endif %}
874 </tr>
875@@ -99,7 +103,7 @@
876 {% endif %}
877 </p>
878 <p class="actions">
879- <button type="submit" class="btn" name="continue">
880+ <button type="submit" class="btn" name="continue" data-qa-id="add_new_email">
881 <span><span>{% trans "Add address" %}</span></span>
882 </button>
883 {% blocktrans %}or <a href="/">cancel</a>{% endblocktrans %}
884
885=== modified file 'src/webui/templates/account/new_email.html'
886--- src/webui/templates/account/new_email.html 2013-04-17 13:23:35 +0000
887+++ src/webui/templates/account/new_email.html 2013-06-13 00:15:30 +0000
888@@ -28,7 +28,9 @@
889 {% endif %}
890 </p>
891 <p class="actions">
892- <button type="submit" class="btn" name="continue"><span><span>{% trans "Send instructions" %}</span></span></button>
893+ <button type="submit" class="btn" name="continue" data-qa-id="send_instructions_confirm_email">
894+ <span><span>{% trans "Send instructions" %}</span></span>
895+ </button>
896 {% trans "or" %}
897 <a href=".">{% trans "cancel" %}</a>
898 </p>
899
900=== modified file 'src/webui/templates/device/addition-generic.html'
901--- src/webui/templates/device/addition-generic.html 2013-05-15 07:47:10 +0000
902+++ src/webui/templates/device/addition-generic.html 2013-06-13 00:15:30 +0000
903@@ -74,10 +74,11 @@
904 <p>
905 <input type="hidden" name="type" value="{{ type }}">
906 <input type="hidden" name="hex_key" value="{{ hex_key }}">
907- <button class="btn" type="submit" data-qa-id="add_generic_device">
908+ <button class="btn" type="submit" data-qa-id="confirm_add_device">
909 <span><span>{% trans "Add device" %}</span></span>
910 </button>
911- {% trans "or" %} <a data-qa-id="cancel" href="{{ device_list_path }}">{% trans "cancel" %}</a>
912+ {% trans "or" %}
913+ <a data-qa-id="cancel_add_device" href="{{ device_list_path }}">{% trans "cancel" %}</a>
914 </p>
915
916 </form>
917
918=== modified file 'src/webui/templates/device/generate-codes.html'
919--- src/webui/templates/device/generate-codes.html 2013-05-31 03:13:32 +0000
920+++ src/webui/templates/device/generate-codes.html 2013-06-13 00:15:30 +0000
921@@ -29,10 +29,11 @@
922 <form method="post">
923 {% csrf_token %}
924 <p>
925- <button class="btn" type="submit" data-qa-id="confirm-codes">
926+ <button class="btn" type="submit" data-qa-id="confirm_new_codes">
927 <span><span>{% trans "Confirm new codes" %}</span></span>
928 </button>
929- {% trans "or" %} <a href="{% url 'device-print' device_id %}" data-qa-id="cancel">{% trans "cancel" %}</a>
930+ {% trans "or" %}
931+ <a href="{% url 'device-print' device_id %}" data-qa-id="cancel_new_codes">{% trans "cancel" %}</a>
932 </p>
933 </form>
934 {% endblock %}
935
936=== modified file 'src/webui/templates/device/list.html'
937--- src/webui/templates/device/list.html 2013-06-07 21:07:00 +0000
938+++ src/webui/templates/device/list.html 2013-06-13 00:15:30 +0000
939@@ -56,7 +56,7 @@
940 <span>{% trans "Delete" %}</span>
941 </a>
942 {% if device.device_type == 'paper' %}
943- <a class="btn-sm" href="{% url 'device-print' device.id %}">
944+ <a class="btn-sm" href="{% url 'device-print' device.id %}" data-qa-id="print_device">
945 <span>{% trans "View Codes" %}</span>
946 </a>
947 {% endif %}
948
949=== modified file 'src/webui/templates/device/print-codes.html'
950--- src/webui/templates/device/print-codes.html 2013-05-21 15:50:20 +0000
951+++ src/webui/templates/device/print-codes.html 2013-06-13 00:15:30 +0000
952@@ -23,13 +23,15 @@
953 {% include 'device/code-list.html' %}
954
955 <p>
956- <a class="btn" id="printbtn" onclick="window.print()" data-qa-id="print_btn"><span><span>{% trans "Print Codes" %}</span></span>
957+ <a class="btn" id="printbtn" onclick="window.print()" data-qa-id="print_codes">
958+ <span><span>{% trans "Print Codes" %}</span></span>
959 </a>
960 {% if generation_enabled %}
961 <a class="btn" href="{% url 'device-generate' device_id %}" data-qa-id="generate_codes">
962 <span><span>{% trans "Generate new codes" %}</span></span>
963 </a>
964 {% endif %}
965- {% trans "or" %} <a href="{% url 'device-list' %}" data-qa-id="go_back">{% trans "go back to device list" %}</a>
966+ {% trans "or" %}
967+ <a href="{% url 'device-list' %}" data-qa-id="cancel_print_codes">{% trans "go back to device list" %}</a>
968 </p>
969 {% endblock %}
970
971=== modified file 'src/webui/templates/device/removal.html'
972--- src/webui/templates/device/removal.html 2013-05-15 07:47:10 +0000
973+++ src/webui/templates/device/removal.html 2013-06-13 00:15:30 +0000
974@@ -30,7 +30,8 @@
975 <button class="btn" type="submit" data-qa-id="delete_this_device">
976 <span><span>{% trans "Delete this device" %}</span></span>
977 </button>
978- {% trans "or" %} <a data-qa-id="cancel_deleting_this_device" href="{{ device_list_path }}">{% trans "cancel" %}</a>
979+ {% trans "or" %}
980+ <a data-qa-id="cancel_deleting_this_device" href="{{ device_list_path }}">{% trans "cancel" %}</a>
981 </p>
982 </form>
983
984
985=== modified file 'src/webui/templates/device/rename.html'
986--- src/webui/templates/device/rename.html 2013-06-07 21:07:00 +0000
987+++ src/webui/templates/device/rename.html 2013-06-13 00:15:30 +0000
988@@ -22,7 +22,7 @@
989 <form method="post" action="">
990 {% csrf_token %}
991
992- <p><label>
993+ <p><label for="id_name">
994 {% trans "Name:" %}<br>
995 {{ form.name }}
996 {% if form.name.errors %}
997
998=== modified file 'src/webui/templates/device/types.html'
999--- src/webui/templates/device/types.html 2013-05-22 19:42:47 +0000
1000+++ src/webui/templates/device/types.html 2013-06-13 00:15:30 +0000
1001@@ -62,7 +62,8 @@
1002 <button class="btn" type="submit" data-qa-id="add_device_from_type">
1003 <span><span>{% trans "Add device" %}</span></span>
1004 </button>
1005- {% trans "or" %} <a data-qa-id="cancel" href="{{ device_list_path }}">{% trans "cancel" %}</a>
1006+ {% trans "or" %}
1007+ <a data-qa-id="cancel_add_device_from_type" href="{{ device_list_path }}">{% trans "cancel" %}</a>
1008 </p>
1009 <p>
1010 {% blocktrans with "twofactor_faq"|static_url as 2FFAQ %}
1011
1012=== modified file 'src/webui/templates/enter_token.html'
1013--- src/webui/templates/enter_token.html 2013-05-31 03:13:32 +0000
1014+++ src/webui/templates/enter_token.html 2013-06-13 00:15:30 +0000
1015@@ -20,14 +20,14 @@
1016
1017 <form method="post">
1018 {% csrf_token %}
1019- <p>
1020+ <p class="input-row">
1021 <label for="id_token">{% trans "Confirmation code" %}</label><br />
1022 {{ form.confirmation_code }}
1023 {% if form.confirmation_code.errors %}
1024 <span class="error">{{ form.confirmation_code.errors|join:"" }}</span>
1025 {% endif %}
1026 </p>
1027- <p>
1028+ <p class="input-row">
1029 <label for="id_email">{% trans "Email address" %}</label><br />
1030 {{ form.email }}
1031 {% if form.email.errors %}
1032@@ -35,7 +35,7 @@
1033 {% endif %}
1034 </p>
1035
1036- <p><button class="btn" type="submit" name="continue">
1037+ <p><button class="btn" type="submit" name="continue" data-qa-id="confirm_enter_token">
1038 <span><span>{% trans "Confirm" %}</span></span></button></p>
1039 </form>
1040
1041
1042=== modified file 'src/webui/templates/launchpad/base.html'
1043--- src/webui/templates/launchpad/base.html 2013-05-15 08:30:15 +0000
1044+++ src/webui/templates/launchpad/base.html 2013-06-13 00:15:30 +0000
1045@@ -9,7 +9,7 @@
1046 {% load i18n %}
1047 {% load static_url %}
1048 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" {% block html_extra %}{% endblock %}>
1049- <head>
1050+ <head data-qa-id="brand_launchpad">
1051 <title>{% block title %}{% trans "Log in" %}{% endblock %}</title>
1052 <link rel="shortcut icon" href="{{ STATIC_URL }}identityprovider/launchpad/favicon.png" />
1053 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}identityprovider/launchpad/styles.css"/>
1054@@ -38,7 +38,7 @@
1055 {% if user.is_authenticated %}
1056 {% include "widgets/launchpad/logout-button.html" %}
1057 {% else %}
1058- <a href="/+login">{% trans "Log in or create account" %}</a>
1059+ {% include "widgets/launchpad/login-button.html" %}
1060 {% endif %}
1061 </div>
1062 </div>
1063@@ -71,12 +71,6 @@
1064 {% endfor %}
1065 {% endif %}
1066
1067- {% if readonly %}
1068- <div class="message">
1069- {% blocktrans %}We are currently in read-only mode. That means that at the moment you can't create new accounts, update your personal information, or request password reminders.{% endblocktrans %}
1070- </div>
1071- {% endif %}
1072-
1073 <div id="{% block content_id %}box{% endblock %}">
1074 {% block content %}{% endblock %}
1075 </div>
1076
1077=== modified file 'src/webui/templates/launchpad/registration/confirm_new_account.html'
1078--- src/webui/templates/launchpad/registration/confirm_new_account.html 2013-05-15 07:25:13 +0000
1079+++ src/webui/templates/launchpad/registration/confirm_new_account.html 2013-06-13 00:15:30 +0000
1080@@ -6,6 +6,8 @@
1081 GNU Affero General Public License version 3 (see the file LICENSE).
1082 {% endcomment %}
1083
1084+{% block html_extra %}data-qa-id="confirm_new_account"{% endblock %}
1085+
1086 {% block title %}{% trans "Complete creating your account" %}{% endblock %}
1087
1088 {% block extra_header_top %}
1089@@ -15,7 +17,7 @@
1090 {% endblock %}
1091
1092 {% block text_title %}
1093- <h1 class="main" data-qa-id="confirm_new_account">{% blocktrans %}Complete creating your {{ brand_description }} account{% endblocktrans %}</h1>
1094+ <h1 class="main">{% blocktrans %}Complete creating your {{ brand_description }} account{% endblocktrans %}</h1>
1095 {% endblock %}
1096
1097 {% block content_id %}auth{% endblock %}
1098@@ -26,7 +28,9 @@
1099 <form id="login-form" class="longfields" method="post" name="loginform">
1100 {% csrf_token %}
1101 <p class="actions">
1102- <button type="submit" name="continue" class="btn"><span><span>{% trans "Complete account creation" %}</span></span></button>
1103+ <button type="submit" name="continue" class="btn" data-qa-id="complete_account_creation">
1104+ <span><span>{% trans "Complete account creation" %}</span></span>
1105+ </button>
1106 {% trans "or" %}
1107 {% include "common/cancel_link.html" %}
1108 </p>
1109
1110=== modified file 'src/webui/templates/launchpad/registration/email_sent.html'
1111--- src/webui/templates/launchpad/registration/email_sent.html 2013-04-17 13:23:35 +0000
1112+++ src/webui/templates/launchpad/registration/email_sent.html 2013-06-13 00:15:30 +0000
1113@@ -7,6 +7,8 @@
1114 GNU Affero General Public License version 3 (see the file LICENSE).
1115 {% endcomment %}
1116
1117+{% block html_extra %}data-qa-id="forgot_password_step_2"{% endblock %}
1118+
1119 {% block title %}{{ email_heading }}{% endblock %}
1120
1121 {% block text_title %}
1122@@ -36,7 +38,7 @@
1123 <input id="confirmation_code" name="confirmation_code" type="text" class="textType" />
1124 <input type="hidden" name="email" value="{{ email }}" />
1125 </p>
1126- <p><button id="submit" type="submit" class="btn" disabled="true">
1127+ <p><button id="submit" type="submit" class="btn" data-qa-id="confirm_email_from_code">
1128 <span><span>{% trans "Confirm" %}</span></span>
1129 </button>
1130 {% url 'account-emails' as emails_url %}
1131
1132=== modified file 'src/webui/templates/launchpad/registration/forgot_password.html'
1133--- src/webui/templates/launchpad/registration/forgot_password.html 2013-02-27 20:45:16 +0000
1134+++ src/webui/templates/launchpad/registration/forgot_password.html 2013-06-13 00:15:30 +0000
1135@@ -6,6 +6,8 @@
1136 GNU Affero General Public License version 3 (see the file LICENSE).
1137 {% endcomment %}
1138
1139+{% block html_extra %}data-qa-id="forgot_password_step_1"{% endblock %}
1140+
1141 {% block title %}{% trans "Reset password" %}{% endblock %}
1142
1143 {% block text_title %}
1144@@ -32,7 +34,9 @@
1145 </span>
1146 </p>
1147 <p class="actions">
1148- <button type="submit" name="continue" class="btn"><span><span>{% trans "Send instructions" %}</span></span></button>
1149+ <button type="submit" name="continue" class="btn" data-qa-id="send_password_reset_token">
1150+ <span><span>{% trans "Send instructions" %}</span></span>
1151+ </button>
1152 {% trans "or" %}
1153 {% include "common/cancel_link.html" %}
1154 </p>
1155
1156=== modified file 'src/webui/templates/launchpad/registration/login.html'
1157--- src/webui/templates/launchpad/registration/login.html 2013-06-05 17:09:49 +0000
1158+++ src/webui/templates/launchpad/registration/login.html 2013-06-13 00:15:30 +0000
1159@@ -74,7 +74,9 @@
1160 {% endif %}
1161 <div class="actions">
1162 {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
1163- <button type="submit" class="btn" name="continue" data-qa-id="login_button"><span><span>{% trans "Log in" %}</span></span></button>
1164+ <button type="submit" class="btn" name="continue" data-qa-id="login_button">
1165+ <span><span>{% trans "Log in" %}</span></span>
1166+ </button>
1167 {% if token %}{% trans "or" %}
1168 {% include "common/cancel_link.html" %}{% endif %}
1169 </div>
1170
1171=== modified file 'src/webui/templates/launchpad/registration/logout.html'
1172--- src/webui/templates/launchpad/registration/logout.html 2013-02-27 20:45:16 +0000
1173+++ src/webui/templates/launchpad/registration/logout.html 2013-06-13 00:15:30 +0000
1174@@ -6,6 +6,8 @@
1175 GNU Affero General Public License version 3 (see the file LICENSE).
1176 {% endcomment %}
1177
1178+{% block html_extra %}data-qa-id="logout"{% endblock %}
1179+
1180 {% block title %}{% trans "You have been logged out" %}{% endblock %}
1181
1182 {% block text_title %}
1183
1184=== modified file 'src/webui/templates/launchpad/registration/new_account.html'
1185--- src/webui/templates/launchpad/registration/new_account.html 2013-05-03 15:30:36 +0000
1186+++ src/webui/templates/launchpad/registration/new_account.html 2013-06-13 00:15:30 +0000
1187@@ -8,6 +8,8 @@
1188 LICENSE).
1189 {% endcomment %}
1190
1191+{% block html_extra %}data-qa-id="new_account"{% endblock %}
1192+
1193 {% block title %}{% trans "Create account" %}{% endblock %}
1194
1195 {% block extra_header_top %}
1196@@ -75,7 +77,9 @@
1197 <input type="hidden" name="old" value="old">
1198 {% endif %}
1199
1200- <button type="submit" class="btn" name="continue"><span><span>{% trans "Send instructions" %}</span></span></button>
1201+ <button type="submit" class="btn" name="continue" data-qa-id="register_button">
1202+ <span><span>{% trans "Send instructions" %}</span></span>
1203+ </button>
1204 {% trans "or" %}
1205 {% include "common/cancel_link.html" %}
1206 </p>
1207
1208=== modified file 'src/webui/templates/launchpad/registration/reset_password.html'
1209--- src/webui/templates/launchpad/registration/reset_password.html 2013-04-10 13:32:29 +0000
1210+++ src/webui/templates/launchpad/registration/reset_password.html 2013-06-13 00:15:30 +0000
1211@@ -6,6 +6,8 @@
1212 GNU Affero General Public License version 3 (see the file LICENSE).
1213 {% endcomment %}
1214
1215+{% block html_extra %}data-qa-id="reset_password"{% endblock %}
1216+
1217 {% block title %}{% trans "Reset password" %}{% endblock %}
1218
1219 {% block extra_header_top %}
1220@@ -61,7 +63,7 @@
1221 {% csrf_token %}
1222 {% include "widgets/passwords.html" %}
1223 <p class="actions">
1224- <button type="submit" name="continue" class="btn">
1225+ <button type="submit" name="continue" class="btn" data-qa-id="reset_password">
1226 <span><span>{% trans "Reset password" %}</span></span>
1227 </button>
1228 {% trans "or" %}
1229
1230=== modified file 'src/webui/templates/launchpad/registration/twofactor.html'
1231--- src/webui/templates/launchpad/registration/twofactor.html 2013-04-17 13:23:35 +0000
1232+++ src/webui/templates/launchpad/registration/twofactor.html 2013-06-13 00:15:30 +0000
1233@@ -3,6 +3,8 @@
1234 {% load i18n %}
1235 {% load static_url %}
1236
1237+{% block html_extra %}data-qa-id="two_factor_verify"{% endblock %}
1238+
1239 {% block content %}
1240 <div id="mainbar">
1241 <div id="auth">
1242@@ -41,7 +43,9 @@
1243
1244 <div class="actions">
1245 {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
1246- <button type="submit" class="btn" name="continue"><span><span>{% trans "Authenticate" %}</span></span></button>
1247+ <button type="submit" class="btn" name="continue" data-qa-id="auth_button">
1248+ <span><span>{% trans "Authenticate" %}</span></span>
1249+ </button>
1250 {% if token %}{% trans "or" %}
1251 {% include "common/cancel_link.html" %}{% endif %}
1252 </div>
1253
1254=== modified file 'src/webui/templates/menu_item.html'
1255--- src/webui/templates/menu_item.html 2012-12-04 18:51:42 +0000
1256+++ src/webui/templates/menu_item.html 2013-06-13 00:15:30 +0000
1257@@ -3,10 +3,16 @@
1258 GNU Affero General Public License version 3 (see the file LICENSE).
1259 {% endcomment %}
1260
1261-<li id="{{ section }}">
1262+<li id="{{ section }}" data-qa-id="{{ section }}">
1263 {% ifequal section current_section %}
1264- <span class="active">{{ label }}</span>
1265+ <span class="active" {% if extra_qa_data_id %}data-qa-id="{{ extra_qa_data_id }}"{% endif %}>
1266+ {{ label }}
1267+ </span>
1268 {% else %}
1269- <a id="{{ section }}-link" href="{{ link }}">{{ label }}</a>
1270+ <a id="{{ section }}-link" data-qa-id="{{ section }}_link" href="{{ link }}">
1271+ <span {% if extra_qa_data_id %}data-qa-id="{{ extra_qa_data_id }}"{% endif %}>
1272+ {{ label }}
1273+ </span>
1274+ </a>
1275 {% endifequal %}
1276 </li>
1277
1278=== modified file 'src/webui/templates/select_language.html'
1279--- src/webui/templates/select_language.html 2013-04-10 13:32:29 +0000
1280+++ src/webui/templates/select_language.html 2013-06-13 00:15:30 +0000
1281@@ -22,6 +22,7 @@
1282 <input type="hidden" name="next" value="{{next}}" />
1283 <input type="hidden" name="language" value="{{lang.0}}" />
1284 <div><input type="submit" name="submit" value="{{lang.1|capfirst}}"
1285+ data-qa-id="choose_language"
1286 style="background: transparent url('{{ STATIC_URL }}identityprovider/flags/{{lang.0}}.png') center left no-repeat" />
1287 </div>
1288 </form>
1289
1290=== modified file 'src/webui/templates/ubuntu/base.html'
1291--- src/webui/templates/ubuntu/base.html 2013-05-15 07:47:10 +0000
1292+++ src/webui/templates/ubuntu/base.html 2013-06-13 00:15:30 +0000
1293@@ -9,7 +9,7 @@
1294 {% load i18n %}
1295 {% load static_url %}
1296 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" {% block html_extra %}{% endblock %}>
1297- <head>
1298+ <head data-qa-id="brand_ubuntu">
1299 <title>{% block title %}{% trans "Log in" %}{% endblock %}</title>
1300 <link rel="icon" type="image/vnd.microsoft.icon" href="{{ STATIC_URL }}identityprovider/ubuntu/favicon.ico" />
1301 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}identityprovider/reset.css"/>
1302@@ -46,7 +46,7 @@
1303 {% block extra_header %}{% endblock %}
1304 <meta name="viewport" content="width=400" />
1305 </head>
1306- <body {% block bodyclass %}class="onecol"{% endblock %} {% if embedded %}onload="blank_targets()"{% endif %}>
1307+ <body data-qa-id="{% block qaid %}{% endblock %}" {% block bodyclass %}class="onecol"{% endblock %} {% if embedded %}onload="blank_targets()"{% endif %}>
1308 <div id="container">
1309 <div id="container-inner">
1310 <div id="header">
1311
1312=== modified file 'src/webui/templates/ubuntu/registration/confirm_new_account.html'
1313--- src/webui/templates/ubuntu/registration/confirm_new_account.html 2013-05-15 07:47:10 +0000
1314+++ src/webui/templates/ubuntu/registration/confirm_new_account.html 2013-06-13 00:15:30 +0000
1315@@ -28,7 +28,9 @@
1316 <form id="login-form" class="longfields" method="post" name="loginform">
1317 {% csrf_token %}
1318 <p class="actions">
1319- <button type="submit" name="continue" class="btn"><span><span>{% trans "Complete account creation" %}</span></span></button>
1320+ <button type="submit" name="continue" class="btn" data-qa-id="complete_account_creation">
1321+ <span><span>{% trans "Complete account creation" %}</span></span>
1322+ </button>
1323 {% trans "or" %}
1324 {% include "common/cancel_link.html" %}
1325 </p>
1326
1327=== modified file 'src/webui/templates/ubuntu/registration/email_sent.html'
1328--- src/webui/templates/ubuntu/registration/email_sent.html 2013-05-15 07:52:08 +0000
1329+++ src/webui/templates/ubuntu/registration/email_sent.html 2013-06-13 00:15:30 +0000
1330@@ -38,7 +38,7 @@
1331 <input id="confirmation_code" name="confirmation_code" type="text" class="textType" />
1332 <input type="hidden" name="email" value="{{ email }}" />
1333 </p>
1334- <p><button id="submit" type="submit" class="btn" disabled="true">
1335+ <p><button id="submit" type="submit" class="btn" data-qa-id="confirm_email_from_code">
1336 <span><span>{% trans "Confirm" %}</span></span>
1337 </button>
1338 {% url 'account-emails' as emails_url %}
1339
1340=== modified file 'src/webui/templates/ubuntu/registration/forgot_password.html'
1341--- src/webui/templates/ubuntu/registration/forgot_password.html 2013-05-15 07:47:10 +0000
1342+++ src/webui/templates/ubuntu/registration/forgot_password.html 2013-06-13 00:15:30 +0000
1343@@ -34,10 +34,11 @@
1344 </span>
1345 </p>
1346 <p class="actions">
1347- <button type="submit" name="continue" class="btn"><span><span>{% trans "Send instructions" %}</span></span></button>
1348+ <button type="submit" name="continue" class="btn" data-qa-id="send_password_reset_token">
1349+ <span><span>{% trans "Send instructions" %}</span></span>
1350+ </button>
1351 {% trans "or" %}
1352 {% include "common/cancel_link.html" %}
1353 </p>
1354 </form>
1355-
1356 {% endblock %}
1357
1358=== modified file 'src/webui/templates/ubuntu/registration/login.html'
1359--- src/webui/templates/ubuntu/registration/login.html 2013-06-05 17:09:49 +0000
1360+++ src/webui/templates/ubuntu/registration/login.html 2013-06-13 00:15:30 +0000
1361@@ -77,7 +77,9 @@
1362
1363 <div class="actions">
1364 {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
1365- <button type="submit" class="btn" name="continue" data-qa-id="login_button"><span><span>{% trans "Log in" %}</span></span></button>
1366+ <button type="submit" class="btn" name="continue" data-qa-id="login_button">
1367+ <span><span>{% trans "Log in" %}</span></span>
1368+ </button>
1369 {% if token %}{% trans "or" %}
1370 {% include "common/cancel_link.html" %}{% endif %}
1371 </div>
1372
1373=== modified file 'src/webui/templates/ubuntu/registration/new_account.html'
1374--- src/webui/templates/ubuntu/registration/new_account.html 2013-05-15 07:52:08 +0000
1375+++ src/webui/templates/ubuntu/registration/new_account.html 2013-06-13 00:15:30 +0000
1376@@ -77,7 +77,9 @@
1377 <input type="hidden" name="old" value="old">
1378 {% endif %}
1379
1380- <button type="submit" class="btn" name="continue"><span><span>{% trans "Send instructions" %}</span></span></button>
1381+ <button type="submit" class="btn" name="continue" data-qa-id="register_button">
1382+ <span><span>{% trans "Send instructions" %}</span></span>
1383+ </button>
1384 {% trans "or" %}
1385 {% include "common/cancel_link.html" %}
1386 </p>
1387@@ -85,5 +87,4 @@
1388 <script type="text/javascript">
1389 document.newaccountform.displayname.focus();
1390 </script>
1391-
1392 {% endblock %}
1393
1394=== modified file 'src/webui/templates/ubuntu/registration/reset_password.html'
1395--- src/webui/templates/ubuntu/registration/reset_password.html 2013-05-15 07:47:10 +0000
1396+++ src/webui/templates/ubuntu/registration/reset_password.html 2013-06-13 00:15:30 +0000
1397@@ -63,7 +63,7 @@
1398 {% csrf_token %}
1399 {% include "widgets/passwords.html" %}
1400 <p class="actions">
1401- <button type="submit" name="continue" class="btn">
1402+ <button type="submit" name="continue" class="btn" data-qa-id="reset_password">
1403 <span><span>{% trans "Reset password" %}</span></span>
1404 </button>
1405 {% trans "or" %}
1406@@ -71,5 +71,4 @@
1407 </p>
1408 <div style="clear: both">&nbsp;</div>
1409 </form>
1410-
1411 {% endblock %}
1412
1413=== modified file 'src/webui/templates/ubuntu/registration/twofactor.html'
1414--- src/webui/templates/ubuntu/registration/twofactor.html 2013-06-07 03:39:56 +0000
1415+++ src/webui/templates/ubuntu/registration/twofactor.html 2013-06-13 00:15:30 +0000
1416@@ -42,7 +42,9 @@
1417
1418 <div class="actions">
1419 {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
1420- <button type="submit" class="btn" name="continue" data-qa-id="auth_button"><span><span>{% trans "Authenticate" %}</span></span></button>
1421+ <button type="submit" class="btn" name="continue" data-qa-id="auth_button">
1422+ <span><span>{% trans "Authenticate" %}</span></span>
1423+ </button>
1424 {% if token %}{% trans "or" %}
1425 {% include "common/cancel_link.html" %}{% endif %}
1426 </div>
1427
1428=== modified file 'src/webui/templates/ubuntuone/account/applications.html'
1429--- src/webui/templates/ubuntuone/account/applications.html 2013-05-15 07:52:08 +0000
1430+++ src/webui/templates/ubuntuone/account/applications.html 2013-06-13 00:15:30 +0000
1431@@ -28,13 +28,13 @@
1432 <tbody>
1433 {% for token in tokens %}
1434 <tr>
1435- <td>{{ token.name }}</td>
1436+ <td data-qa-id="application_token">{{ token.name }}</td>
1437 <td class="application-date">{{ token.created_at|date:"Y/m/d" }}</td>
1438 <td class="actions">
1439 <form action="{% url 'applications' %}" method="post">
1440 {% csrf_token %}
1441 <input type="hidden" name="token_id" value="{{ token.token }}" />
1442- <button type="submit" class="cta btn-sm secondary" name="Delete">
1443+ <button type="submit" class="cta btn-sm secondary" name="Delete" data-qa-id="delete_application">
1444 <span>{% trans "Delete" %}</span>
1445 </button>
1446 </form>
1447@@ -44,8 +44,6 @@
1448 </tbody>
1449 </table>
1450 </section>
1451-
1452-
1453 {% else %}
1454 <p>{% trans "You don't have any applications associated with this account." %}</p>
1455 {% endif %}
1456
1457=== modified file 'src/webui/templates/ubuntuone/account/confirm_new_email.html'
1458--- src/webui/templates/ubuntuone/account/confirm_new_email.html 2013-05-31 03:30:26 +0000
1459+++ src/webui/templates/ubuntuone/account/confirm_new_email.html 2013-06-13 00:15:30 +0000
1460@@ -22,10 +22,10 @@
1461 {% csrf_token %}
1462 <p>
1463 <input type="hidden" name="post" value="yes" />
1464- <button type="submit" name="continue" class="btn cta">
1465+ <button type="submit" name="continue" class="btn cta" data-qa-id="confirm_email_validation">
1466 <span>{% trans "Yes, I'm sure" %}</span>
1467 </button>
1468- <a class="cta secondary" href="{% if token %}/{{ token }}{% endif %}/">{% trans "Cancel" %}</a>
1469+ <a class="cta secondary" href="{% if token %}/{{ token }}{% endif %}/" data-qa-id="cancel_email_validation">{% trans "Cancel" %}</a>
1470 </p>
1471 </form>
1472 </div>
1473
1474=== modified file 'src/webui/templates/ubuntuone/account/delete_email.html'
1475--- src/webui/templates/ubuntuone/account/delete_email.html 2013-05-31 03:13:32 +0000
1476+++ src/webui/templates/ubuntuone/account/delete_email.html 2013-06-13 00:15:30 +0000
1477@@ -24,7 +24,9 @@
1478 <form action="" method="POST">
1479 {% csrf_token %}
1480 <p>
1481- <button type="submit" class="cta" name="delete"><span>{% trans "Yes, delete" %}</span></button>
1482+ <button type="submit" class="btn cta" name="delete" data-qa-id="confirm_delete_email">
1483+ <span>{% trans "Yes, delete" %}</span>
1484+ </button>
1485 {% include "common/cancel_link.html" %}
1486 </p>
1487 </form>
1488
1489=== modified file 'src/webui/templates/ubuntuone/account/edit.html'
1490--- src/webui/templates/ubuntuone/account/edit.html 2013-05-30 09:21:29 +0000
1491+++ src/webui/templates/ubuntuone/account/edit.html 2013-06-13 00:15:30 +0000
1492@@ -118,7 +118,9 @@
1493
1494 <p class="actions">
1495 {% if not readonly %}
1496- <button type="submit" class="btn cta" name="update"><span>{% trans "Save changes" %}</span></button>
1497+ <button type="submit" class="btn cta" name="update" data-qa-id="update_preferences">
1498+ <span>{% trans "Save changes" %}</span>
1499+ </button>
1500 {% endif %}
1501 {% if token %}
1502 {% trans "or" %}
1503
1504=== modified file 'src/webui/templates/ubuntuone/account/emails.html'
1505--- src/webui/templates/ubuntuone/account/emails.html 2013-05-15 11:07:23 +0000
1506+++ src/webui/templates/ubuntuone/account/emails.html 2013-06-13 00:15:30 +0000
1507@@ -46,7 +46,9 @@
1508 {% if not readonly %}
1509 <td class="actions">
1510 {% if not email.is_preferred %}
1511- <a href="./+remove-email?id={{ email.id }}" class="btn-sm" data-qa-id="remove_verified_email"><span>{% trans "Delete" %}</span></a>
1512+ <a href="./+remove-email?id={{ email.id }}" class="btn-sm" data-qa-id="remove_verified_email">
1513+ <span>{% trans "Delete" %}</span>
1514+ </a>
1515 {% endif %}
1516 </td>
1517 {% endif %}
1518@@ -73,7 +75,9 @@
1519 {% if email.is_verifiable %}
1520 <a href="./+verify-email?id={{ email.id }}" data-qa-id="verify_unverified_{{ email }}" class="verify-email btn-sm"><span>{% trans "Verify" %}</span></a>
1521 {% endif %}
1522- <a href="./+remove-email?id={{ email.id }}" data-qa-id="delete_unverified_{{ email }}" class="btn-sm"><span>{% trans "Delete" %}</span></a>
1523+ <a href="./+remove-email?id={{ email.id }}" data-qa-id="delete_unverified_{{ email }}" class="btn-sm">
1524+ <span>{% trans "Delete" %}</span>
1525+ </a>
1526 </td>
1527 {% endif %}
1528 </tr>
1529@@ -101,7 +105,7 @@
1530 {% endif %}
1531 </div>
1532 <p class="actions">
1533- <button type="submit" class="btn cta" name="continue">
1534+ <button type="submit" class="btn cta" name="continue" data-qa-id="add_new_email">
1535 <span>{% trans "Add address" %}</span>
1536 </button>
1537 <a class="cta secondary" href="/">{% trans "Cancel" %}</a>
1538
1539=== modified file 'src/webui/templates/ubuntuone/account/new_email.html'
1540--- src/webui/templates/ubuntuone/account/new_email.html 2013-05-14 13:11:47 +0000
1541+++ src/webui/templates/ubuntuone/account/new_email.html 2013-06-13 00:15:30 +0000
1542@@ -25,7 +25,9 @@
1543 {% endif %}
1544 </p>
1545 <p class="actions">
1546- <button type="submit" class="btn cta" name="continue"><span>{% trans "Send instructions" %}</span></button>
1547+ <button type="submit" class="btn cta" name="continue" data-qa-id="send_instructions_confirm_email">
1548+ <span>{% trans "Send instructions" %}</span>
1549+ </button>
1550 <a class="cta secondary" href=".">{% trans "Cancel" %}</a>
1551 </p>
1552 </form>
1553
1554=== modified file 'src/webui/templates/ubuntuone/base.html'
1555--- src/webui/templates/ubuntuone/base.html 2013-06-10 07:32:53 +0000
1556+++ src/webui/templates/ubuntuone/base.html 2013-06-13 00:15:30 +0000
1557@@ -3,7 +3,7 @@
1558 <!--[if IE 8 ]><html class="ie8" lang="en" dir="ltr"><![endif]-->
1559 <!--[if (gte IE 9)|!(IE)]><!--><html lang="en" dir="ltr" {% block html_extra %}{% endblock %}><!--<![endif]-->
1560 {% comment %}Copyright 2013 Canonical Ltd. This software is licensed under the GNU Affero General Public License version 3 (see the file LICENSE).{% endcomment %}
1561-<head>
1562+<head data-qa-id="brand_ubuntuone">
1563 <meta charset="utf-8">
1564 <meta name="viewport" content="width=device-width">
1565 {% block extra_meta %}{% endblock %}
1566
1567=== modified file 'src/webui/templates/ubuntuone/device/list.html'
1568--- src/webui/templates/ubuntuone/device/list.html 2013-05-15 07:52:08 +0000
1569+++ src/webui/templates/ubuntuone/device/list.html 2013-06-13 00:15:30 +0000
1570@@ -44,14 +44,14 @@
1571 <tr>
1572 <td class="name">{{ device.name }}</td>
1573 <td class="actions">
1574- <a class="btn-sm" href="{% url 'device-rename' device.id %}">
1575+ <a class="btn-sm" href="{% url 'device-rename' device.id %}" data-qa-id="rename_device">
1576 <span>{% trans "Rename" %}</span>
1577 </a>
1578 <a class="btn-sm" href="{% url 'device-removal' device.id %}" data-qa-id="delete_device">
1579 <span>{% trans "Delete" %}</span>
1580 </a>
1581 {% if device.device_type == 'paper' %}
1582- <a class="btn-sm" href="{% url 'device-print' device.id %}">
1583+ <a class="btn-sm" href="{% url 'device-print' device.id %}" data-qa-id="print_device">
1584 <span>{% trans "View Codes" %}</span>
1585 </a>
1586 {% endif %}
1587@@ -66,7 +66,9 @@
1588 <p>{% trans "You don't have any authentication devices associated with this account." %}</p>
1589 {% endif %}
1590
1591- <p><a data-qa-id="add_new_device" href="{{ device_addition_path }}">{% trans "Add a new authentication device" %}</a></p>
1592+ <p><a data-qa-id="add_new_device" href="{{ device_addition_path }}">
1593+ {% trans "Add a new authentication device" %}
1594+ </a></p>
1595
1596 <p><a href="{% url 'device-help' %}">{% trans "Report a lost or stolen device" %}</a></p>
1597
1598
1599=== modified file 'src/webui/templates/ubuntuone/device/print-codes.html'
1600--- src/webui/templates/ubuntuone/device/print-codes.html 2013-05-21 15:50:20 +0000
1601+++ src/webui/templates/ubuntuone/device/print-codes.html 2013-06-13 00:15:30 +0000
1602@@ -27,12 +27,14 @@
1603 {% include 'device/code-list.html' %}
1604
1605 <p>
1606- <button class="btn cta" id="printbtn" onclick="window.print()" data-qa-id="print_btn"><span>{% trans "Print Codes" %}</span></button>
1607+ <button class="btn cta" id="printbtn" onclick="window.print()" data-qa-id="print_codes">
1608+ <span>{% trans "Print Codes" %}</span>
1609+ </button>
1610+ <a class="cta secondary" href="{% url 'device-list' %}" data-qa-id="cancel_print_codes">{% trans "Go back" %}</a>
1611 {% if generation_enabled %}
1612+ <a class="btn cta secondary print-new-codes" href="{% url 'device-generate' device_id %}" data-qa-id="generate_codes">
1613+ <span>{% trans "Generate new codes" %}</span>
1614+ </a>
1615 {% endif %}
1616- <a class="cta secondary" href="{% url 'device-list' %}">{% trans "Go back" %}</a>
1617- <a class="cta secondary print-new-codes" href="{% url 'device-generate' device_id %}">
1618- <span>{% trans "Generate new codes" %}</span>
1619-</a>
1620 </p>
1621 {% endblock %}
1622
1623=== modified file 'src/webui/templates/ubuntuone/device/rename.html'
1624--- src/webui/templates/ubuntuone/device/rename.html 2013-04-24 08:09:34 +0000
1625+++ src/webui/templates/ubuntuone/device/rename.html 2013-06-13 00:15:30 +0000
1626@@ -6,6 +6,8 @@
1627 Affero General Public License version 3 (see the file LICENSE).
1628 {% endcomment %}
1629
1630+{% block html_extra %}data-qa-id="device_rename"{% endblock %}
1631+
1632 {% block title %}
1633 {% blocktrans %}{{ user }}'s devices{% endblocktrans %}
1634 {% endblock %}
1635@@ -27,10 +29,10 @@
1636 </label></p>
1637
1638 <p>
1639- <button class="btn cta" type="submit">
1640+ <button class="btn cta" type="submit" data-qa-id="rename_this_device">
1641 <span>{% trans "Rename" %}</span>
1642 </button>
1643- <a class="cta secondary" href="{{ device_list_path }}">{% trans "Cancel" %}</a>
1644+ <a class="cta secondary" href="{{ device_list_path }}" data-qa-id="cancel_renaming_this_device">{% trans "Cancel" %}</a>
1645 </p>
1646
1647 </form>
1648
1649=== modified file 'src/webui/templates/ubuntuone/device/types.html'
1650--- src/webui/templates/ubuntuone/device/types.html 2013-05-22 19:42:47 +0000
1651+++ src/webui/templates/ubuntuone/device/types.html 2013-06-13 00:15:30 +0000
1652@@ -60,7 +60,7 @@
1653 <button class="btn cta" type="submit" data-qa-id="add_device_from_type">
1654 <span>{% trans "Add device" %}</span>
1655 </button>
1656- <a class="cta secondary" data-qa-id="cancel" href="{{ device_list_path }}">{% trans "Cancel" %}</a>
1657+ <a class="cta secondary" data-qa-id="cancel_add_device_from_type" href="{{ device_list_path }}">{% trans "Cancel" %}</a>
1658 </p>
1659 <p>
1660 {% blocktrans with "twofactor_faq"|static_url as 2FFAQ %}
1661
1662=== modified file 'src/webui/templates/ubuntuone/enter_token.html'
1663--- src/webui/templates/ubuntuone/enter_token.html 2013-05-31 03:13:32 +0000
1664+++ src/webui/templates/ubuntuone/enter_token.html 2013-06-13 00:15:30 +0000
1665@@ -35,7 +35,7 @@
1666 {% endif %}
1667 </p>
1668
1669- <p><button class="btn cta" type="submit" name="continue">
1670+ <p><button class="btn" type="submit" name="continue" data-qa-id="confirm_enter_token">
1671 <span><span>{% trans "Confirm" %}</span></span></button></p>
1672 </form>
1673
1674
1675=== modified file 'src/webui/templates/ubuntuone/registration/_create_account_form.html'
1676--- src/webui/templates/ubuntuone/registration/_create_account_form.html 2013-06-07 09:38:53 +0000
1677+++ src/webui/templates/ubuntuone/registration/_create_account_form.html 2013-06-13 00:15:30 +0000
1678@@ -66,7 +66,8 @@
1679 <input type="hidden" name="old" value="old">
1680 {% endif %}
1681
1682- <button type="submit" class="btn cta" name="continue"><span>{% trans "Create account" %}</span></button>
1683+ <button type="submit" class="btn cta" name="continue" data-qa-id="register_button">
1684+ <span>{% trans "Create account" %}</span>
1685+ </button>
1686 </div>
1687 </form>
1688-
1689
1690=== modified file 'src/webui/templates/ubuntuone/registration/_login_form.html'
1691--- src/webui/templates/ubuntuone/registration/_login_form.html 2013-06-06 12:27:42 +0000
1692+++ src/webui/templates/ubuntuone/registration/_login_form.html 2013-06-13 00:15:30 +0000
1693@@ -40,7 +40,9 @@
1694
1695 <div class="actions">
1696 {% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
1697- <button type="submit" class="btn cta" name="continue" data-qa-id="login_button"><span>{% trans "Log in" %}</span></button>
1698+ <button type="submit" class="btn cta" name="continue" data-qa-id="login_button">
1699+ <span>{% trans "Log in" %}</span>
1700+ </button>
1701 <p class="forgot-password">{% include "common/forgot_password_link.html" %}</p>
1702
1703 {% comment %}
1704
1705=== modified file 'src/webui/templates/ubuntuone/registration/confirm_new_account.html'
1706--- src/webui/templates/ubuntuone/registration/confirm_new_account.html 2013-05-15 07:47:10 +0000
1707+++ src/webui/templates/ubuntuone/registration/confirm_new_account.html 2013-06-13 00:15:30 +0000
1708@@ -22,7 +22,9 @@
1709 <form id="login-form" class="longfields" method="post" name="loginform">
1710 {% csrf_token %}
1711 <p class="actions">
1712- <button type="submit" name="continue" class="btn"><span><span>{% trans "Complete account creation" %}</span></span></button>
1713+ <button type="submit" name="continue" class="btn" data-qa-id="complete_account_creation">
1714+ <span><span>{% trans "Complete account creation" %}</span></span>
1715+ </button>
1716 {% trans "or" %}
1717 {% include "common/cancel_link.html" %}
1718 </p>
1719
1720=== modified file 'src/webui/templates/ubuntuone/registration/email_sent.html'
1721--- src/webui/templates/ubuntuone/registration/email_sent.html 2013-05-28 16:59:50 +0000
1722+++ src/webui/templates/ubuntuone/registration/email_sent.html 2013-06-13 00:15:30 +0000
1723@@ -34,7 +34,7 @@
1724 <input id="confirmation_code" name="confirmation_code" type="text" class="textType" />
1725 <input type="hidden" name="email" value="{{ email }}" />
1726 </p>
1727- <p><button id="submit" type="submit" class="btn cta" disabled="true">
1728+ <p><button id="submit" type="submit" class="btn cta" data-qa-id="confirm_email_from_code">
1729 <span>{% trans "Continue" %}</span>
1730 </button>
1731 {% url 'account-emails' as emails_url %}
1732
1733=== modified file 'src/webui/templates/ubuntuone/registration/forgot_password.html'
1734--- src/webui/templates/ubuntuone/registration/forgot_password.html 2013-05-15 07:47:10 +0000
1735+++ src/webui/templates/ubuntuone/registration/forgot_password.html 2013-06-13 00:15:30 +0000
1736@@ -34,8 +34,9 @@
1737 </span>
1738 </p>
1739 <p class="actions">
1740- <button type="submit" name="continue" class="btn cta"><span><span>{% trans "Continue" %}</span></span></button>
1741+ <button type="submit" name="continue" class="btn cta" data-qa-id="send_password_reset_token">
1742+ <span><span>{% trans "Continue" %}</span></span>
1743+ </button>
1744 </p>
1745 </form>
1746-
1747 {% endblock %}
1748
1749=== modified file 'src/webui/templates/ubuntuone/registration/reset_password.html'
1750--- src/webui/templates/ubuntuone/registration/reset_password.html 2013-05-15 07:47:10 +0000
1751+++ src/webui/templates/ubuntuone/registration/reset_password.html 2013-06-13 00:15:30 +0000
1752@@ -18,15 +18,14 @@
1753 {% block content_id %}auth{% endblock %}
1754
1755 {% block content %}
1756- <p>8 characters minimum.</p>
1757+ <p>{% trans "8 characters minimum." %}</p>
1758 <form id="login-form" class="longfields" method="post">
1759 {% csrf_token %}
1760 {% include "widgets/ubuntuone/passwords.html" with edit_account_labels=1 fields=form %}
1761 <p class="actions">
1762- <button type="submit" name="continue" class="btn cta">
1763+ <button type="submit" name="continue" class="btn cta" data-qa-id="reset_password">
1764 <span><span>{% trans "Continue" %}</span></span>
1765 </button>
1766 </p>
1767 </form>
1768-
1769 {% endblock %}
1770
1771=== modified file 'src/webui/templates/ubuntuone/registration/twofactor.html'
1772--- src/webui/templates/ubuntuone/registration/twofactor.html 2013-05-15 07:52:08 +0000
1773+++ src/webui/templates/ubuntuone/registration/twofactor.html 2013-06-13 00:15:30 +0000
1774@@ -2,6 +2,8 @@
1775
1776 {% load i18n %}
1777
1778+{% block html_extra %}data-qa-id="two_factor_verify"{% endblock %}
1779+
1780 {% block extra_css %}
1781 {% if rpconfig and rpconfig.logo_url %}
1782 <style type="text/css" data-qa-id="test_2f_rp">
1783@@ -60,7 +62,9 @@
1784
1785 <div class="actions">
1786 {% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
1787- <button type="submit" class="cta" name="continue"><span>{% trans "Authenticate" %}</span></button>
1788+ <button type="submit" class="cta" name="continue" data-qa-id="auth_button">
1789+ <span>{% trans "Authenticate" %}</span>
1790+ </button>
1791 {% if token %}{% trans "or" %}
1792 {% include "common/cancel_link.html" %}{% endif %}
1793 </div>
1794
1795=== modified file 'src/webui/templates/ubuntuone/select_language.html'
1796--- src/webui/templates/ubuntuone/select_language.html 2013-04-11 10:43:00 +0000
1797+++ src/webui/templates/ubuntuone/select_language.html 2013-06-13 00:15:30 +0000
1798@@ -48,7 +48,9 @@
1799 </p>
1800 {% endfor %}
1801
1802- <button type="submit" name="submit" class="cta">{% trans "Choose language" %}</button>
1803+ <button type="submit" name="submit" data-qa-id="choose_language" class="btn cta">
1804+ {% trans "Choose language" %}
1805+ </button>
1806 </form>
1807
1808 </div>
1809
1810=== modified file 'src/webui/templates/ubuntuone/server/decide.html'
1811--- src/webui/templates/ubuntuone/server/decide.html 2013-05-31 03:30:26 +0000
1812+++ src/webui/templates/ubuntuone/server/decide.html 2013-06-13 00:15:30 +0000
1813@@ -22,22 +22,23 @@
1814
1815
1816 <div class="info">
1817- {% blocktrans %} You are logging in to <a data-qa-id="rp_backlink"
1818- href="{{ trust_root }}">{{ trust_root }}</a>{% endblocktrans %}
1819+ <p data-qa-id="rp_login_title">{% blocktrans %} You are logging in to
1820+ <a data-qa-id="rp_backlink" href="{{ trust_root }}">{{ trust_root }}</a>
1821+ {% endblocktrans %}</p>
1822 {% if rpconfig %}
1823- <p>{% blocktrans with site_name=rpconfig.displayname %}{{ site_name }} has
1824- requested some personal information, please choose what you would like to
1825- share:{% endblocktrans %}</p>
1826+ <p>{% blocktrans with site_name=rpconfig.displayname %}{{ site_name }} has
1827+ requested some personal information, please choose what you would like to
1828+ share:{% endblocktrans %}</p>
1829 {% else %}
1830- <p>{% blocktrans %} The site has requested some personal information,
1831- please choose what you would like to share:{% endblocktrans %}</p>
1832+ <p>{% blocktrans %} The site has requested some personal information,
1833+ please choose what you would like to share:{% endblocktrans %}</p>
1834 {% endif %}
1835 </div>
1836
1837 <div class="actions">
1838 <form action="{{ action }}" method="POST" name="decideform">
1839 {% csrf_token %}
1840- <div class="info-items">
1841+ <div data-qa-id="info-items" class="info-items">
1842 {% if user_attribs_form.has_data or teams_form.has_data %}
1843 <ul class="list">
1844 {% if user_attribs_form.has_data %}
1845@@ -69,7 +70,9 @@
1846
1847 <p>
1848 <input type="hidden" name="ok" />
1849- <button type="submit" class="cta" name="yes" data-qa-id="rp_confirm_login"><span><span>{% trans "Yes, log me in" %}</span></span></button>
1850+ <button type="submit" class="btn cta" name="yes" data-qa-id="rp_confirm_login">
1851+ <span><span>{% trans "Yes, log me in" %}</span></span>
1852+ </button>
1853 {% trans "or" %}
1854 <a href="+cancel">{% trans "cancel" %}</a>
1855 </p>
1856
1857=== added file 'src/webui/templates/widgets/launchpad/login-button.html'
1858--- src/webui/templates/widgets/launchpad/login-button.html 1970-01-01 00:00:00 +0000
1859+++ src/webui/templates/widgets/launchpad/login-button.html 2013-06-13 00:15:30 +0000
1860@@ -0,0 +1,12 @@
1861+{% comment %}
1862+Copyright 2010 Canonical Ltd. This software is licensed under the
1863+GNU Affero General Public License version 3 (see the file LICENSE).
1864+{% endcomment %}
1865+
1866+{% load i18n %}
1867+
1868+<span id="login" data-qa-id="login">
1869+ <a id="login-link" data-qa-id="login_link" href="{% url 'login' %}">
1870+ {% trans "Log in or create account" %}
1871+ </a>
1872+</span>
1873
1874=== modified file 'src/webui/templates/widgets/launchpad/logout-button.html'
1875--- src/webui/templates/widgets/launchpad/logout-button.html 2013-06-05 15:22:18 +0000
1876+++ src/webui/templates/widgets/launchpad/logout-button.html 2013-06-13 00:15:30 +0000
1877@@ -1,16 +1,19 @@
1878 {% comment %}
1879-Copyright 2010 Canonical Ltd. This software is licensed under the
1880-GNU Affero General Public License version 3 (see the file LICENSE).
1881+Copyright 2010-2013 Canonical Ltd. This software is licensed under
1882+the GNU Affero General Public License version 3 (see the file
1883+LICENSE).
1884 {% endcomment %}
1885
1886 {% load i18n %}
1887
1888-<form action="/+logout" method="post">
1889+<form action="{% url 'logout' %}" method="post" id="account" data-qa-id="account">
1890 {% csrf_token %}
1891 <input type="hidden" name="loggingout" value="1" />
1892- {% if not readonly %}<a href="/+edit" class="sprite person">{% endif %}
1893+ {% if not readonly %}
1894+ <a href="{% url 'account-index' %}" id="account-link" data-qa-id="account_link" class="sprite person">
1895+ {% endif %}
1896 <span data-qa-id="user_name">{% if user.username %}{{ user.username }}{% else %}{{ user.displayname }}{% endif %}</span>
1897 {% if not readonly %}</a>{% endif %}
1898 &bull;
1899- <input type="submit" name="logout" value="Log Out" />
1900+ <input type="submit" name="logout" id="logout-link" data-qa-id="logout_link" value="Log Out" />
1901 </form>
1902
1903=== modified file 'src/webui/templates/widgets/passwords.html'
1904--- src/webui/templates/widgets/passwords.html 2012-12-18 18:37:03 +0000
1905+++ src/webui/templates/widgets/passwords.html 2013-06-13 00:15:30 +0000
1906@@ -22,7 +22,7 @@
1907 {% if form.password.errors %}
1908 <span class="error">{{ form.password.errors|first }}</span>
1909 {% endif %}
1910- <span id="password_strength"></span>
1911+ <span id="password_strength" data-qa-id="password_strength"></span>
1912 <span class="formHelp">{{ form.password.help_text }}</span>
1913 </p>
1914
1915
1916=== modified file 'src/webui/templates/widgets/ubuntu/login-button.html'
1917--- src/webui/templates/widgets/ubuntu/login-button.html 2013-04-17 13:23:35 +0000
1918+++ src/webui/templates/widgets/ubuntu/login-button.html 2013-06-13 00:15:30 +0000
1919@@ -4,9 +4,9 @@
1920 {% endcomment %}
1921
1922 {% load i18n %}
1923+{% load menu_item %}
1924
1925 <ul>
1926- <li id="login">
1927- <a href="{% url 'login' %}" id="login-link">{% trans "Log in or create account" %}</a>
1928- </li>
1929-</ul>
1930+ {% url 'login' as login_url %}
1931+ {% menu_item "login" _("Log in or create account") login_url %}
1932+<ul>
1933
1934=== modified file 'src/webui/templates/widgets/ubuntu/logout-button.html'
1935--- src/webui/templates/widgets/ubuntu/logout-button.html 2013-04-17 13:23:35 +0000
1936+++ src/webui/templates/widgets/ubuntu/logout-button.html 2013-06-13 00:15:30 +0000
1937@@ -1,5 +1,5 @@
1938 {% comment %}
1939-Copyright 2010, 2012 Canonical Ltd. This software is licensed under
1940+Copyright 2010-2013 Canonical Ltd. This software is licensed under
1941 the GNU Affero General Public License version 3 (see the file
1942 LICENSE).
1943 {% endcomment %}
1944@@ -15,7 +15,7 @@
1945 {% else %}
1946 {% url 'account-index' as account_url %}
1947 {% endif %}
1948-{% menu_item "account" user.displayname account_url %}
1949+{% menu_item "account" user.displayname account_url extra_qa_data_id="user_name" %}
1950
1951 {% if token and not readonly %}
1952 {% url 'account-edit' token=token as edit_url %}
1953
1954=== modified file 'src/webui/templates/widgets/ubuntuone/header-me-menu.html'
1955--- src/webui/templates/widgets/ubuntuone/header-me-menu.html 2013-06-10 07:32:53 +0000
1956+++ src/webui/templates/widgets/ubuntuone/header-me-menu.html 2013-06-13 00:15:30 +0000
1957@@ -1,9 +1,15 @@
1958 {% load i18n %}
1959+{% load menu_item %}
1960+
1961 <ul>
1962 {% if user.is_authenticated %}
1963- <li>
1964- <span data-qa-id="user_name" class="user-name">{{user.displayname}}</span> <a href="{% url 'account-index' %}">{% trans "My account" %}</a> <span class="sep">|</span>
1965- <a href="{% url 'logout' %}" id="logout-link">{% trans "Log out" %}</a>
1966+ <li id="account" data-qa-id="account">
1967+ <span data-qa-id="user_name" class="user-name">{{user.displayname}}</span>
1968+ <a href="{% url 'account-index' %}" id="account-link" data-qa-id="account_link">{% trans "My account" %}</a> <span class="sep">|</span>
1969+ <a href="{% url 'logout' %}" id="logout-link" data-qa-id="logout_link">{% trans "Log out" %}</a>
1970 </li>
1971+{% else %}
1972+ {% url 'login' as login_url %}
1973+ {% menu_item "login" _("Log in or Sign up") login_url %}
1974 {% endif %}
1975 </ul>
1976
1977=== modified file 'src/webui/templates/widgets/ubuntuone/personal-menu.html'
1978--- src/webui/templates/widgets/ubuntuone/personal-menu.html 2013-06-03 06:32:02 +0000
1979+++ src/webui/templates/widgets/ubuntuone/personal-menu.html 2013-06-13 00:15:30 +0000
1980@@ -15,7 +15,7 @@
1981 {% else %}
1982 {% url 'account-index' as account_url %}
1983 {% endif %}
1984-{% menu_item "account" _("Personal details") account_url %}
1985+{% menu_item "account2" _("Personal details") account_url %}
1986
1987 {% if not token and not readonly %}
1988 {% ifswitch TWOFACTOR %}
1989
1990=== modified file 'src/webui/views/account.py'
1991--- src/webui/views/account.py 2013-05-16 13:24:00 +0000
1992+++ src/webui/views/account.py 2013-06-13 00:15:30 +0000
1993@@ -52,6 +52,7 @@
1994 get_rpconfig_from_request,
1995 require_testing_enabled,
1996 )
1997+from identityprovider.utils import get_current_brand
1998
1999 from webui.decorators import (
2000 check_readonly,
2001@@ -334,7 +335,7 @@
2002 @sso_login_required
2003 @check_readonly
2004 def applications(request):
2005- if settings.BRAND not in ('ubuntu', 'ubuntuone'):
2006+ if get_current_brand() not in ('ubuntu', 'ubuntuone'):
2007 raise Http404
2008
2009 if request.method == 'POST':
2010@@ -349,7 +350,7 @@
2011 pass
2012 return HttpResponseRedirect('/+applications')
2013 else:
2014- tokens = request.user.oauth_tokens()
2015+ tokens = request.user.oauth_tokens().order_by('created_at')
2016 context = RequestContext(request, {
2017 'current_section': 'applications',
2018 'tokens': tokens,
2019
2020=== modified file 'src/webui/views/ui.py'
2021--- src/webui/views/ui.py 2013-06-07 14:51:46 +0000
2022+++ src/webui/views/ui.py 2013-06-13 00:15:30 +0000
2023@@ -872,7 +872,7 @@
2024
2025
2026 def static_page(request, page_name):
2027- if settings.BRAND not in ('ubuntu', 'ubuntuone'):
2028+ if get_current_brand() not in ('ubuntu', 'ubuntuone'):
2029 raise Http404
2030
2031 return render_to_response('static/%s.html' % page_name,