|
Lines 68-80
SKIP: {
Link Here
|
| 68 |
like( $driver->get_title, qr(Two-factor authentication), 'Must be on the page with the pref on' ); |
68 |
like( $driver->get_title, qr(Two-factor authentication), 'Must be on the page with the pref on' ); |
| 69 |
|
69 |
|
| 70 |
is( |
70 |
is( |
| 71 |
$driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="two-factor-status"]' )->get_text, |
71 |
$driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, |
| 72 |
'Status: Disabled', |
72 |
'Status: Disabled', |
| 73 |
'2FA is disabled' |
73 |
'2FA is disabled' |
| 74 |
); |
74 |
); |
| 75 |
|
75 |
|
| 76 |
is( |
76 |
is( |
| 77 |
$driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="two-factor-status"]' )->get_text, |
77 |
$driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, |
| 78 |
'', # 'Status: Enabled' is not shown |
78 |
'', # 'Status: Enabled' is not shown |
| 79 |
'2FA is disabled' |
79 |
'2FA is disabled' |
| 80 |
); |
80 |
); |
|
Lines 100-112
SKIP: {
Link Here
|
| 100 |
$s->wait_for_ajax; |
100 |
$s->wait_for_ajax; |
| 101 |
$driver->get($s->base_url . q|members/two_factor_auth.pl|); |
101 |
$driver->get($s->base_url . q|members/two_factor_auth.pl|); |
| 102 |
is( |
102 |
is( |
| 103 |
$driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="two-factor-status"]' )->get_text, |
103 |
$driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, |
| 104 |
'', # 'Status: Disabled' is not shown |
104 |
'', # 'Status: Disabled' is not shown |
| 105 |
'2FA is enabled' |
105 |
'2FA is enabled' |
| 106 |
); |
106 |
); |
| 107 |
|
107 |
|
| 108 |
is( |
108 |
is( |
| 109 |
$driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="two-factor-status"]' )->get_text, |
109 |
$driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, |
| 110 |
'Status: Enabled', |
110 |
'Status: Enabled', |
| 111 |
'2FA is enabled' |
111 |
'2FA is enabled' |
| 112 |
); |
112 |
); |
|
Lines 311-323
SKIP: {
Link Here
|
| 311 |
$driver->get( $s->base_url . q|members/two_factor_auth.pl| ); |
311 |
$driver->get( $s->base_url . q|members/two_factor_auth.pl| ); |
| 312 |
|
312 |
|
| 313 |
is( |
313 |
is( |
| 314 |
$driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="two-factor-status"]' )->get_text, |
314 |
$driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, |
| 315 |
'', # 'Status: Disabled' is not shown |
315 |
'', # 'Status: Disabled' is not shown |
| 316 |
'2FA is enabled' |
316 |
'2FA is enabled' |
| 317 |
); |
317 |
); |
| 318 |
|
318 |
|
| 319 |
is( |
319 |
is( |
| 320 |
$driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="two-factor-status"]' )->get_text, |
320 |
$driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, |
| 321 |
'Status: Enabled', |
321 |
'Status: Enabled', |
| 322 |
'2FA is enabled' |
322 |
'2FA is enabled' |
| 323 |
); |
323 |
); |
|
Lines 325-337
SKIP: {
Link Here
|
| 325 |
$driver->find_element('//form[@id="two-factor-auth"]//input[@type="submit"]')->click; |
325 |
$driver->find_element('//form[@id="two-factor-auth"]//input[@type="submit"]')->click; |
| 326 |
|
326 |
|
| 327 |
is( |
327 |
is( |
| 328 |
$driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="two-factor-status"]' )->get_text, |
328 |
$driver->find_element( '//div[@id="registration-status-disabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, |
| 329 |
'Status: Disabled', |
329 |
'Status: Disabled', |
| 330 |
'2FA is disabled' |
330 |
'2FA is disabled' |
| 331 |
); |
331 |
); |
| 332 |
|
332 |
|
| 333 |
is( |
333 |
is( |
| 334 |
$driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="two-factor-status"]' )->get_text, |
334 |
$driver->find_element( '//div[@id="registration-status-enabled"]/div[@class="alert alert-info two-factor-status"]' )->get_text, |
| 335 |
'', # 'Status: Enabled' is not shown |
335 |
'', # 'Status: Enabled' is not shown |
| 336 |
'2FA is disabled' |
336 |
'2FA is disabled' |
| 337 |
); |
337 |
); |