diff --git a/frontend_tests/casper_tests/01-login.js b/frontend_tests/casper_tests/01-login.js index fb6dbb7ee8..0e4791bc92 100644 --- a/frontend_tests/casper_tests/01-login.js +++ b/frontend_tests/casper_tests/01-login.js @@ -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 () {