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.
This commit is contained in:
Tim Abbott 2017-07-07 21:14:52 -07:00
parent 4f8a2d0c57
commit 9657c4c176
1 changed files with 4 additions and 2 deletions

View File

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