mirror of https://github.com/zulip/zulip.git
casper: Use then_log_out() in 01-login.js
This commit is contained in:
parent
69694b77fb
commit
0ded74e9de
|
@ -12,21 +12,12 @@ common.init_viewport();
|
|||
casper.start(realm_url, common.initialize_casper);
|
||||
|
||||
casper.then(function () {
|
||||
casper.test.assertHttpStatus(302);
|
||||
casper.test.assertUrlMatch(/^http:\/\/[^\/]+\/login/, 'Redirected to /login');
|
||||
});
|
||||
|
||||
common.then_log_in();
|
||||
|
||||
casper.waitForSelector('#zhome', function () {
|
||||
casper.test.info('Logging out');
|
||||
casper.click('li[title="Log out"] a');
|
||||
});
|
||||
|
||||
casper.then(function () {
|
||||
casper.test.assertHttpStatus(200);
|
||||
casper.test.assertUrlMatch(/accounts\/login\/$/);
|
||||
});
|
||||
common.then_log_out();
|
||||
|
||||
// Run the above queued actions.
|
||||
casper.run(function () {
|
||||
|
|
Loading…
Reference in New Issue