custom_profile_fields: Confirmation modal for delete profile field.

This commit is contained in:
Yogesh Sirsat
2022-08-29 22:13:14 +05:30
committed by Tim Abbott
parent c4233d2472
commit 2328dc0d4e
3 changed files with 58 additions and 7 deletions

View File

@@ -63,6 +63,18 @@ async function test_edit_profile_field(page: Page): Promise<void> {
async function test_delete_custom_profile_field(page: Page): Promise<void> {
await page.click(`${profile_field_row} button.delete`);
await common.wait_for_micromodal_to_open(page);
assert.strictEqual(
await common.get_text_from_selector(page, ".dialog_heading"),
"Delete custom profile field?",
);
assert.strictEqual(
await common.get_text_from_selector(page, "#dialog_widget_modal .dialog_submit_button"),
"Confirm",
);
await page.click("#dialog_widget_modal .dialog_submit_button");
await common.wait_for_micromodal_to_close(page);
await page.waitForSelector("#admin-profile-field-status img", {visible: true});
assert.strictEqual(
await common.get_text_from_selector(page, "div#admin-profile-field-status"),