mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 15:35:27 +08:00
This reverts commit 243284f998e213034f9f0c6b228f97f7c9834fdd. There are some issues in how the JS tests interact that I will need to figure out here before this can be merged.
This commit is contained in:
@ -34,31 +34,6 @@ QUnit.test("suspend a user - cancel", async assert => {
|
||||
assert.equal(find(".suspend-user-modal:visible").length, 0);
|
||||
});
|
||||
|
||||
QUnit.test("suspend a user - cancel with input", async assert => {
|
||||
await visit("/admin/users/1234/regular");
|
||||
await click(".suspend-user");
|
||||
|
||||
assert.equal(find(".suspend-user-modal:visible").length, 1);
|
||||
|
||||
await fillIn(".suspend-reason", "for breaking the rules");
|
||||
await fillIn(".suspend-message", "this is an email reason why");
|
||||
|
||||
await click(".d-modal-cancel");
|
||||
|
||||
assert.equal(find(".bootbox.modal:visible").length, 1);
|
||||
|
||||
await click(".modal-footer .btn-default");
|
||||
assert.equal(find(".suspend-user-modal:visible").length, 1);
|
||||
assert.equal(
|
||||
find(".suspend-message")[0].value,
|
||||
"this is an email reason why"
|
||||
);
|
||||
|
||||
await click(".d-modal-cancel");
|
||||
await click(".modal-footer .btn-primary");
|
||||
assert.equal(find(".suspend-user-modal:visible").length, 0);
|
||||
});
|
||||
|
||||
QUnit.test("suspend, then unsuspend a user", async assert => {
|
||||
const suspendUntilCombobox = selectKit(".suspend-until .combobox");
|
||||
|
||||
|
@ -28,7 +28,7 @@ QUnit.test("modal", async function(assert) {
|
||||
await click(".login-button");
|
||||
assert.ok(find(".d-modal:visible").length === 1, "modal should reappear");
|
||||
|
||||
await keyEvent("#main-outlet", "keyup", 27);
|
||||
await keyEvent("#main-outlet", "keydown", 27);
|
||||
assert.ok(
|
||||
find(".d-modal:visible").length === 0,
|
||||
"ESC should close the modal"
|
||||
@ -47,7 +47,7 @@ QUnit.test("modal", async function(assert) {
|
||||
find(".d-modal:visible").length === 1,
|
||||
"modal should not disappear when you click outside"
|
||||
);
|
||||
await keyEvent("#main-outlet", "keyup", 27);
|
||||
await keyEvent("#main-outlet", "keydown", 27);
|
||||
assert.ok(
|
||||
find(".d-modal:visible").length === 1,
|
||||
"ESC should not close the modal"
|
||||
@ -61,7 +61,7 @@ QUnit.test("modal-keyboard-events", async function(assert) {
|
||||
|
||||
await click(".toggle-admin-menu");
|
||||
await click(".topic-admin-status-update button");
|
||||
await keyEvent(".d-modal", "keyup", 13);
|
||||
await keyEvent(".d-modal", "keydown", 13);
|
||||
|
||||
assert.ok(
|
||||
find("#modal-alert:visible").length === 1,
|
||||
@ -72,7 +72,7 @@ QUnit.test("modal-keyboard-events", async function(assert) {
|
||||
"hitting Enter does not dismiss modal due to alert error"
|
||||
);
|
||||
|
||||
await keyEvent("#main-outlet", "keyup", 27);
|
||||
await keyEvent("#main-outlet", "keydown", 27);
|
||||
assert.ok(
|
||||
find(".d-modal:visible").length === 0,
|
||||
"ESC should close the modal"
|
||||
@ -82,7 +82,7 @@ QUnit.test("modal-keyboard-events", async function(assert) {
|
||||
|
||||
await click(".d-editor-button-bar .btn.link");
|
||||
|
||||
await keyEvent(".d-modal", "keyup", 13);
|
||||
await keyEvent(".d-modal", "keydown", 13);
|
||||
assert.ok(
|
||||
find(".d-modal:visible").length === 0,
|
||||
"modal should disappear on hitting Enter"
|
||||
|
Reference in New Issue
Block a user