casper: Fix race condition in stars test.

I have no idea why this started failing just now, but the test was
written without a proper wait in between actions, and fixing that
fixes the failure I'd been seeing.
This commit is contained in:
Tim Abbott 2018-04-23 09:14:22 -07:00
parent 56b0479656
commit de691e8564
1 changed files with 8 additions and 3 deletions

View File

@ -37,10 +37,15 @@ casper.then(function () {
// Clicking on a message star stars it.
toggle_last_star();
casper.test.assertEquals(star_count(), 1,
"Got expected single star count.");
});
casper.click('a[href^="#narrow/is/starred"]');
casper.then(function () {
casper.waitUntilVisible('#zhome .icon-vector-star', function () {
casper.test.assertEquals(star_count(), 1,
"Got expected single star count.");
casper.click('a[href^="#narrow/is/starred"]');
});
});
casper.waitUntilVisible('#zfilt', function () {