casper_tests: Adjust for the addition of Desdemona.

Commit 9b78a73e36 (#15005) made some of
our poorly written Casper tests fail.  Now they’re just as poorly
written but passing again.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-05-26 20:31:36 -07:00 committed by Tim Abbott
parent 4680d504de
commit 3c7c163d7f
2 changed files with 6 additions and 3 deletions

View File

@ -532,9 +532,10 @@ casper.then(function () {
{keepFocus: true}); {keepFocus: true});
} }
// go down 2, up 3 (which is really 2), then down 2 // go down 2, up 3 (which is really 2), then down 3
// Iago // Iago
// Cordelia // Cordelia
// Desdemona
// Hamlet // Hamlet
arrow('Down'); arrow('Down');
arrow('Down'); arrow('Down');
@ -543,6 +544,7 @@ casper.then(function () {
arrow('Up'); // does nothing arrow('Up'); // does nothing
arrow('Down'); arrow('Down');
arrow('Down'); arrow('Down');
arrow('Down');
}); });
casper.waitForSelector('#user_presences li.highlighted_user [data-name="King Hamlet"]', function () { casper.waitForSelector('#user_presences li.highlighted_user [data-name="King Hamlet"]', function () {

View File

@ -151,8 +151,9 @@ casper.then(function () {
casper.test.assertSelectorHasText('.description', 'Oimeesaw'); casper.test.assertSelectorHasText('.description', 'Oimeesaw');
// Based on the selected checkboxes while creating stream, // Based on the selected checkboxes while creating stream,
// 4 users from Scotland are added. // 4 users from Scotland are added.
// 1 user, Cordelia, is added. Othello (subscribed to Scotland) is not added twice. // 1 user, Cordelia, is added. Othello (subscribed to Scotland) is removed.
casper.test.assertSelectorHasText('.subscriber-count-text', '5'); // FIXME: This assertion may pick up the count from a random other stream.
casper.test.assertSelectorHasText('.subscriber-count-text', '4');
casper.fill('form#stream_creation_form', {stream_name: ' '}); casper.fill('form#stream_creation_form', {stream_name: ' '});
casper.click('form#stream_creation_form button.button.sea-green'); casper.click('form#stream_creation_form button.button.sea-green');
}); });