Skip to content

Commit

Permalink
casper: Use waitUntilVisible in settings tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
timabbott committed Feb 10, 2017
1 parent 1aac52d commit 532cfab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend_tests/casper_tests/06-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ casper.then(function () {
https://github.com/zulip/zulip/issues/1269. Consequently, we can't wait
on any condition to avoid the race condition.
casper.waitForSelector('#create_alert_word_form', function () {
casper.waitUntilVisible('#create_alert_word_form', function () {
casper.test.info('Attempting to submit an empty alert word');
casper.click('#create_alert_word_button');
casper.test.info('Checking that an error is displayed');
Expand Down Expand Up @@ -198,7 +198,7 @@ casper.waitForSelector('#create_alert_word_form', function () {
casper.then(function change_default_language() {
casper.test.info('Changing the default language');
casper.click('[data-section="display-settings"]');
casper.waitForSelector('#default_language');
casper.waitUntilVisible('#default_language');
});

casper.thenClick('#default_language');
Expand All @@ -214,7 +214,7 @@ casper.waitUntilVisible('#display-settings-status', function () {
});

casper.then(function () {
casper.waitForSelector("#default_language", function () {
casper.waitUntilVisible("#default_language", function () {
casper.test.info("Checking if we are on Chinese page.");
casper.test.assertEvalEquals(function () {
return $('#default_language_name').text();
Expand All @@ -232,7 +232,7 @@ if (REALMS_HAVE_SUBDOMAINS) {

casper.thenOpen(settings_url);

casper.waitForSelector("#settings-change-box", function check_url_preference() {
casper.waitUntilVisible("#settings-change-box", function check_url_preference() {
casper.test.info("Checking the i18n url language precedence.");
casper.test.assertEvalEquals(function () {
return document.documentElement.lang;
Expand Down

0 comments on commit 532cfab

Please sign in to comment.