From 9657c4c1768c01b6526e53038100655005981a23 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 7 Jul 2017 21:14:52 -0700 Subject: [PATCH] casper: Fix flaky realm creation test. This test was failing nondeterministically, because depending on when the check was done, the unread message may or may not have been read. --- frontend_tests/casper_tests/00-realm-creation.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend_tests/casper_tests/00-realm-creation.js b/frontend_tests/casper_tests/00-realm-creation.js index c88da1d98e..ce70e7d02f 100644 --- a/frontend_tests/casper_tests/00-realm-creation.js +++ b/frontend_tests/casper_tests/00-realm-creation.js @@ -74,8 +74,10 @@ casper.then(function () { }); casper.then(function () { - // The user is logged in to the newly created realm - this.test.assertTitle('(1) home - ' + organization_name + ' - Zulip'); + // The user is logged in to the newly created realm and the app is loaded + // '(1) home - ' + organization_name + ' - Zulip' (but the (1) may or may not be there) + this.test.assertTitleMatch(/ - Zulip$/, "Title ends with Zulip"); + this.test.assertTitleMatch(/home - /, "Title shows in the home view"); }); common.then_log_out();