mirror of https://github.com/zulip/zulip.git
realm-icon: Add realm icon frontend tests.
This commit is contained in:
parent
a4f99fdb22
commit
132534b3bb
|
@ -202,6 +202,31 @@ casper.then(function () {
|
|||
|
||||
// TODO: Test stream deletion
|
||||
|
||||
// Test uploading realm icon image
|
||||
casper.then(function () {
|
||||
casper.click("li[data-section='organization-settings']");
|
||||
casper.test.assertExists('img#realm-settings-icon[src^="https://secure.gravatar.com/avatar/"]');
|
||||
casper.test.assertEqual(casper.visible('#realm_icon_delete_button'), false);
|
||||
casper.fill('form.admin-realm-form', {
|
||||
realm_icon_file_input: 'static/images/logo/zulip-icon-128x128.png',
|
||||
}, true);
|
||||
casper.waitWhileVisible("#upload_icon_spinner .loading_indicator_spinner", function () {
|
||||
casper.test.assertExists('img#realm-settings-icon[src^="/user_avatars/1/realm/icon.png?version=2"]');
|
||||
casper.test.assertEqual(casper.visible('#realm_icon_delete_button'), true);
|
||||
});
|
||||
});
|
||||
|
||||
// Test deleting realm icon image
|
||||
casper.then(function () {
|
||||
casper.click("li[data-section='organization-settings']");
|
||||
casper.click("#realm_icon_delete_button");
|
||||
casper.test.assertEqual(casper.visible('#realm_icon_delete_button'), true);
|
||||
casper.waitWhileVisible("#upload_icon_spinner .loading_indicator_spinner", function () {
|
||||
casper.test.assertExists('img#realm-settings-icon[src^="https://secure.gravatar.com/avatar/"]');
|
||||
casper.test.assertEqual(casper.visible('#realm_icon_delete_button'), false);
|
||||
});
|
||||
});
|
||||
|
||||
casper.then(function () {
|
||||
casper.click("li[data-section='organization-settings']");
|
||||
casper.waitUntilVisible('#id_realm_default_language', function () {
|
||||
|
|
Loading…
Reference in New Issue