From 0ded74e9de155819d605c77ca1ad31170f4b8321 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Fri, 7 Oct 2016 10:04:01 -0700 Subject: [PATCH] casper: Use then_log_out() in 01-login.js --- frontend_tests/casper_tests/01-login.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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 () {