casper: Use then_log_out() in 01-login.js

This commit is contained in:
Steve Howell 2016-10-07 10:04:01 -07:00 committed by Tim Abbott
parent 69694b77fb
commit 0ded74e9de
1 changed files with 1 additions and 10 deletions

View File

@ -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 () {