display_settings: Change success/failure feedback interface.

This replaces the cumbersome system we had for giving users feedback
on settings state changes in the display settings UI.

We expect this new system to be what we will attempt to migrate other
settings widgets to match over the coming weeks and months.  It also
provides the opportunity to significant refactor away a lot of the
code duplication in settings_display.js.

Thanks to Brock Whittaker for redoing the styling and improving the
code simplicity.

Fixes #7622.
This commit is contained in:
Balaji2198
2018-02-06 21:33:03 +05:30
committed by Tim Abbott
parent b846ab1000
commit 5aa7098c81
6 changed files with 124 additions and 44 deletions

View File

@@ -263,8 +263,8 @@ casper.waitUntilVisible('#default_language_modal');
casper.thenClick('a[data-code="zh-hans"]');
casper.waitUntilVisible('#display-settings-status', function () {
casper.test.assertSelectorHasText('#display-settings-status', '简体中文 is now the default language');
casper.waitUntilVisible('#language-settings-status a', function () {
casper.test.assertSelectorHasText('#language-settings-status', 'Saved. Please reload for the change to take effect.');
casper.test.info("Reloading the page.");
casper.reload();
});
@@ -301,8 +301,8 @@ casper.thenClick('a[data-code="en"]');
/*
* Changing the language back to English so that subsequent tests pass.
*/
casper.waitUntilVisible('#display-settings-status', function () {
casper.test.assertSelectorHasText('#display-settings-status', 'English ist die neue Standardsprache! Du musst das Fenster neu laden um die Änderungen anzuwenden');
casper.waitUntilVisible('#language-settings-status a', function () {
casper.test.assertSelectorHasText('#language-settings-status', 'Saved. Please reload for the change to take effect.');
});
casper.thenOpen("http://zulip.zulipdev.com:9981/");