~jaboing/canonical-identity-provider/device_login

« back to all changes in this revision

Viewing changes to acceptance/pages.py

  • Committer: Tarmac
  • Author(s): Leo Arias
  • Date: 2013-05-31 19:32:34 UTC
  • mfrom: (895.1.4 qa_anchors)
  • Revision ID: tarmac-20130531193234-sqmve2abceyk6zrf
[r=nataliabidart] Added the qa_anchors where missing, removed the text verification where unnecessary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
 
80
80
class YourEmailAddresses(u1testutils.sso.sst.pages.PageWithUserSubheader):
81
81
 
82
 
    title = "{0}'s email addresses"
83
82
    url_path = '/+emails'
84
83
    qa_anchor = 'account_emails'
85
84
 
86
 
    def assert_title(self):
87
 
        user_name = self.subheader.get_user_name()
88
 
        sst.actions.assert_title(self.title.format(user_name))
89
 
 
90
85
    @log_action(logging.info)
91
86
    def add_email(self, email_address):
92
87
        sst.actions.write_textfield('id_newemail', email_address)
102
97
 
103
98
class EnterConfirmationCode(u1testutils.sso.sst.pages.PageWithUserSubheader):
104
99
 
105
 
    title = 'Enter confirmation code'
106
100
    url_path = '/+enter_token'
 
101
    qa_anchor = 'enter_token'
107
102
 
108
103
    @log_action(logging.info)
109
104
    def confirm(self, confirmation_code, email_address):
127
122
 
128
123
class DeleteEmail(u1testutils.sso.sst.pages.PageWithUserSubheader):
129
124
 
130
 
    title = 'Delete unverified email'
 
125
    qa_anchor = 'delete_email'
131
126
    url_path = '/+remove-email'
132
127
 
133
128
    @log_action(logging.info)
140
135
 
141
136
class ResetPassword(u1testutils.sso.sst.pages.PageWithAnonymousSubheader):
142
137
 
143
 
    title = 'Reset password'
144
138
    url_path = '/+forgot_password'
145
 
    headings1 = [
146
 
        'Ubuntu Single Sign On',
147
 
        'Reset your Ubuntu Single Sign On password'
148
 
    ]
149
139
    qa_anchor = 'forgot_password_step_1'
150
140
 
151
141
    @log_action(logging.info)
161
151
 
162
152
    url_path = '/.*/\+decide'
163
153
    is_url_path_regex = True
164
 
    headings2 = ['Log in', 'Are you new?']
165
154
 
166
155
 
167
156
# Devices pages.
168
157
 
169
158
class YourAuthenticationDevices(PageWithUsernameInTitle):
170
159
 
171
 
    title = "{0}'s devices"
172
160
    url_path = '/device-list'
173
 
    headings1 = ['Ubuntu Single Sign On', 'Your authentication devices']
174
161
    qa_anchor = 'device_list'
175
162
 
176
163
    def get_devices(self):
209
196
 
210
197
class DeleteAuthenticationDevice(PageWithUsernameInTitle):
211
198
 
212
 
    title = "{0}'s devices"
213
199
    url_path = '/device-removal/.*'
214
200
    is_url_path_regex = True
215
 
    headings1 = ['Ubuntu Single Sign On', 'Delete device?']
216
201
    qa_anchor = 'device_removal'
217
202
 
218
203
    @log_action(logging.info)
233
218
 
234
219
class AddNewAuthenticationDevice(PageWithUsernameInTitle):
235
220
 
236
 
    title = "{0}'s devices"
237
221
    url_path = '/device-addition'
238
 
    headings1 = ['Ubuntu Single Sign On', 'Add a new authentication device']
239
222
    qa_anchor = 'device_addition'
240
223
 
241
224
    @log_action(logging.info)
289
272
 
290
273
class AddDevice(PageWithUsernameInTitle):
291
274
 
292
 
    title = "{0}'s devices"
293
275
    url_path = '/device-addition'
294
 
    headings1 = ['Ubuntu Single Sign On', 'Add device']
295
276
    qa_anchor = 'device_addition'
296
277
 
297
278
    @log_action(logging.info)
453
434
 
454
435
class GenerateNewPaperCodes(PageWithUsernameInTitle):
455
436
 
456
 
    title = "{0}'s devices"
457
437
    url_path = '/device-generate/.*'
458
438
    is_url_path_regex = True
459
 
    headings1 = ['Ubuntu Single Sign On', 'Generate new codes']
 
439
    qa_anchor = 'generate_new_codes'
460
440
 
461
441
    @log_action(logging.info)
462
442
    def confirm_new_codes(self):