From 2894924ffb22d21c393f93231fcb5897622fe0aa Mon Sep 17 00:00:00 2001 From: Umair Khan Date: Wed, 8 Mar 2017 17:45:54 +0500 Subject: [PATCH] capitalization: Fix Only Admins may now create new streams. --- frontend_tests/casper_tests/10-admin.js | 5 +++-- static/js/admin.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend_tests/casper_tests/10-admin.js b/frontend_tests/casper_tests/10-admin.js index 5c7541e769..1eb0dd1c9d 100644 --- a/frontend_tests/casper_tests/10-admin.js +++ b/frontend_tests/casper_tests/10-admin.js @@ -19,7 +19,7 @@ casper.waitForSelector('#settings_overlay_container.show', function () { casper.test.assertUrlMatch(/^http:\/\/[^/]+\/#administration/, 'URL suggests we are on administration page'); }); -// Test only admins may create streams Setting +// Test setting limiting stream creation to administrators casper.waitForSelector('input[type="checkbox"][id="id_realm_create_stream_by_admins_only"]', function () { casper.click('input[type="checkbox"][id="id_realm_create_stream_by_admins_only"]'); casper.click('form.admin-realm-form input.button'); @@ -28,7 +28,8 @@ casper.waitForSelector('input[type="checkbox"][id="id_realm_create_stream_by_adm casper.then(function () { // Test setting was activated casper.waitUntilVisible('#admin-realm-create-stream-by-admins-only-status', function () { - casper.test.assertSelectorHasText('#admin-realm-create-stream-by-admins-only-status', 'Only Admins may now create new streams!'); + casper.test.assertSelectorHasText('#admin-realm-create-stream-by-admins-only-status', + 'Only administrators may now create new streams!'); casper.test.assertEval(function () { return document.querySelector('input[type="checkbox"][id="id_realm_create_stream_by_admins_only"]').checked; }, 'Only admins may create streams Setting activated'); diff --git a/static/js/admin.js b/static/js/admin.js index 9f7bf76481..3fc758f397 100644 --- a/static/js/admin.js +++ b/static/js/admin.js @@ -683,7 +683,7 @@ function _setup_page() { } if (response_data.create_stream_by_admins_only !== undefined) { if (response_data.create_stream_by_admins_only) { - ui.report_success(i18n.t("Only Admins may now create new streams!"), create_stream_by_admins_only_status); + ui.report_success(i18n.t("Only administrators may now create new streams!"), create_stream_by_admins_only_status); } else { ui.report_success(i18n.t("Any user may now create new streams!"), create_stream_by_admins_only_status); }