mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
settings_users: Refactor user_deactivation modal to confirm_dialog module.
The "email" span in the old modal was not used for styling, just to support updating the field visually.
This commit is contained in:
committed by
Tim Abbott
parent
bc169d63a7
commit
418c40b2ea
@@ -23,19 +23,22 @@ async function test_deactivate_user(page: Page): Promise<void> {
|
||||
await page.waitForSelector(cordelia_user_row, {visible: true});
|
||||
await page.waitForSelector(cordelia_user_row + " .fa-user-times");
|
||||
await page.click(cordelia_user_row + " .deactivate");
|
||||
await page.waitForSelector("#deactivation_user_modal", {visible: true});
|
||||
await page.waitForSelector("#confirm_dialog_modal", {visible: true});
|
||||
|
||||
assert.strictEqual(
|
||||
await common.get_text_from_selector(page, "#deactivation_user_modal_label"),
|
||||
await common.get_text_from_selector(page, ".confirm_dialog_heading"),
|
||||
"Deactivate " + (await common.get_internal_email_from_name(page, "cordelia")),
|
||||
"Deactivate modal has wrong user.",
|
||||
);
|
||||
assert.strictEqual(
|
||||
await common.get_text_from_selector(page, "#deactivation_user_modal .do_deactivate_button"),
|
||||
await common.get_text_from_selector(
|
||||
page,
|
||||
"#confirm_dialog_modal .confirm_dialog_yes_button",
|
||||
),
|
||||
"Confirm",
|
||||
"Deactivate button has incorrect text.",
|
||||
);
|
||||
await page.click("#deactivation_user_modal .do_deactivate_button");
|
||||
await page.click("#confirm_dialog_modal .confirm_dialog_yes_button");
|
||||
await page.waitForSelector("#user-field-status", {hidden: true});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user