mirror of https://github.com/zulip/zulip.git
capitalization: Fix Only Admins may now create new streams.
This commit is contained in:
parent
c0e92015fd
commit
2894924ffb
|
@ -19,7 +19,7 @@ casper.waitForSelector('#settings_overlay_container.show', function () {
|
||||||
casper.test.assertUrlMatch(/^http:\/\/[^/]+\/#administration/, 'URL suggests we are on administration page');
|
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.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('input[type="checkbox"][id="id_realm_create_stream_by_admins_only"]');
|
||||||
casper.click('form.admin-realm-form input.button');
|
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 () {
|
casper.then(function () {
|
||||||
// Test setting was activated
|
// Test setting was activated
|
||||||
casper.waitUntilVisible('#admin-realm-create-stream-by-admins-only-status', function () {
|
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 () {
|
casper.test.assertEval(function () {
|
||||||
return document.querySelector('input[type="checkbox"][id="id_realm_create_stream_by_admins_only"]').checked;
|
return document.querySelector('input[type="checkbox"][id="id_realm_create_stream_by_admins_only"]').checked;
|
||||||
}, 'Only admins may create streams Setting activated');
|
}, 'Only admins may create streams Setting activated');
|
||||||
|
|
|
@ -683,7 +683,7 @@ function _setup_page() {
|
||||||
}
|
}
|
||||||
if (response_data.create_stream_by_admins_only !== undefined) {
|
if (response_data.create_stream_by_admins_only !== undefined) {
|
||||||
if (response_data.create_stream_by_admins_only) {
|
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 {
|
} else {
|
||||||
ui.report_success(i18n.t("Any user may now create new streams!"), create_stream_by_admins_only_status);
|
ui.report_success(i18n.t("Any user may now create new streams!"), create_stream_by_admins_only_status);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue