mirror of https://github.com/zulip/zulip.git
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:
parent
56b0479656
commit
de691e8564
|
@ -37,10 +37,15 @@ casper.then(function () {
|
||||||
|
|
||||||
// Clicking on a message star stars it.
|
// Clicking on a message star stars it.
|
||||||
toggle_last_star();
|
toggle_last_star();
|
||||||
|
});
|
||||||
|
|
||||||
|
casper.then(function () {
|
||||||
|
casper.waitUntilVisible('#zhome .icon-vector-star', function () {
|
||||||
casper.test.assertEquals(star_count(), 1,
|
casper.test.assertEquals(star_count(), 1,
|
||||||
"Got expected single star count.");
|
"Got expected single star count.");
|
||||||
|
|
||||||
casper.click('a[href^="#narrow/is/starred"]');
|
casper.click('a[href^="#narrow/is/starred"]');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
casper.waitUntilVisible('#zfilt', function () {
|
casper.waitUntilVisible('#zfilt', function () {
|
||||||
|
|
Loading…
Reference in New Issue