casper: Fix missing casper.then in subscriptions tests.

This commit is contained in:
Tim Abbott
2017-03-20 23:21:38 -07:00
parent a903d28d78
commit 32b77d970b

View File

@@ -99,6 +99,7 @@ casper.then(function () {
true,
"Rome is visible again");
});
casper.then(function () {
casper.waitUntilVisible('#stream_creation_form', function () {
casper.test.assertTextExists('Create stream', 'New stream creation panel');
casper.fill('form#stream_creation_form', {stream_name: 'Waseemio', stream_description: 'Oimeesaw'});
@@ -107,12 +108,16 @@ casper.waitUntilVisible('#stream_creation_form', function () {
casper.click('input[value="othello@zulip.com"] ~ span');
casper.click('form#stream_creation_form button.btn.btn-primary');
});
});
casper.then(function () {
casper.waitFor(function () {
return casper.evaluate(function () {
return $('.stream-name').is(':contains("Waseemio")');
});
});
});
casper.then(function () {
casper.test.info("User should be subscribed to stream Waseemio");
casper.test.assertSelectorHasText('.stream-name', 'Waseemio');