mirror of https://github.com/zulip/zulip.git
settings: Rename btn -> button in JS variables.
This commit is a part of the efforts to rename btn-related classes and variables to align with Zulip's no-abbreviations policy and streamline the search results.
This commit is contained in:
parent
663fb36e35
commit
15cc27af6e
|
@ -193,8 +193,8 @@ async function test_botserverrc(page: Page): Promise<void> {
|
||||||
async function test_edit_bot_form(page: Page): Promise<void> {
|
async function test_edit_bot_form(page: Page): Promise<void> {
|
||||||
return;
|
return;
|
||||||
const bot1_email = "1-bot@zulip.testserver";
|
const bot1_email = "1-bot@zulip.testserver";
|
||||||
const bot1_edit_btn = `.open_edit_bot_form[data-email="${CSS.escape(bot1_email)}"]`;
|
const bot1_edit_button = `.open_edit_bot_form[data-email="${CSS.escape(bot1_email)}"]`;
|
||||||
await page.click(bot1_edit_btn);
|
await page.click(bot1_edit_button);
|
||||||
|
|
||||||
const edit_form_selector = `#bot-edit-form[data-email="${CSS.escape(bot1_email)}"]`;
|
const edit_form_selector = `#bot-edit-form[data-email="${CSS.escape(bot1_email)}"]`;
|
||||||
await page.waitForSelector(edit_form_selector, {visible: true});
|
await page.waitForSelector(edit_form_selector, {visible: true});
|
||||||
|
@ -204,8 +204,8 @@ async function test_edit_bot_form(page: Page): Promise<void> {
|
||||||
);
|
);
|
||||||
|
|
||||||
await common.fill_form(page, edit_form_selector, {full_name: "Bot one"});
|
await common.fill_form(page, edit_form_selector, {full_name: "Bot one"});
|
||||||
const save_btn_selector = "#user-profile-modal .dialog_submit_button";
|
const save_button_selector = "#user-profile-modal .dialog_submit_button";
|
||||||
await page.click(save_btn_selector);
|
await page.click(save_button_selector);
|
||||||
|
|
||||||
// The form gets closed on saving. So, assert it's closed by waiting for it to be hidden.
|
// The form gets closed on saving. So, assert it's closed by waiting for it to be hidden.
|
||||||
await page.waitForSelector("#edit_bot_modal", {hidden: true});
|
await page.waitForSelector("#edit_bot_modal", {hidden: true});
|
||||||
|
@ -227,8 +227,8 @@ async function test_edit_bot_form(page: Page): Promise<void> {
|
||||||
async function test_invalid_edit_bot_form(page: Page): Promise<void> {
|
async function test_invalid_edit_bot_form(page: Page): Promise<void> {
|
||||||
return;
|
return;
|
||||||
const bot1_email = "1-bot@zulip.testserver";
|
const bot1_email = "1-bot@zulip.testserver";
|
||||||
const bot1_edit_btn = `.open_edit_bot_form[data-email="${CSS.escape(bot1_email)}"]`;
|
const bot1_edit_button = `.open_edit_bot_form[data-email="${CSS.escape(bot1_email)}"]`;
|
||||||
await page.click(bot1_edit_btn);
|
await page.click(bot1_edit_button);
|
||||||
|
|
||||||
const edit_form_selector = `#bot-edit-form[data-email="${CSS.escape(bot1_email)}"]`;
|
const edit_form_selector = `#bot-edit-form[data-email="${CSS.escape(bot1_email)}"]`;
|
||||||
await page.waitForSelector(edit_form_selector, {visible: true});
|
await page.waitForSelector(edit_form_selector, {visible: true});
|
||||||
|
@ -238,8 +238,8 @@ async function test_invalid_edit_bot_form(page: Page): Promise<void> {
|
||||||
);
|
);
|
||||||
|
|
||||||
await common.fill_form(page, edit_form_selector, {full_name: "Bot 2"});
|
await common.fill_form(page, edit_form_selector, {full_name: "Bot 2"});
|
||||||
const save_btn_selector = "#user-profile-modal .dialog_submit_button";
|
const save_button_selector = "#user-profile-modal .dialog_submit_button";
|
||||||
await page.click(save_btn_selector);
|
await page.click(save_button_selector);
|
||||||
|
|
||||||
// The form should not get closed on saving. Errors should be visible on the form.
|
// The form should not get closed on saving. Errors should be visible on the form.
|
||||||
await common.wait_for_micromodal_to_open(page);
|
await common.wait_for_micromodal_to_open(page);
|
||||||
|
@ -301,8 +301,8 @@ async function get_alert_words_status_text(page: Page): Promise<string> {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function close_alert_words_status(page: Page): Promise<void> {
|
async function close_alert_words_status(page: Page): Promise<void> {
|
||||||
const status_close_btn = ".close-alert-word-status";
|
const status_close_button = ".close-alert-word-status";
|
||||||
await page.click(status_close_btn);
|
await page.click(status_close_button);
|
||||||
await page.waitForSelector(alert_word_status_selector, {hidden: true});
|
await page.waitForSelector(alert_word_status_selector, {hidden: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,9 +326,9 @@ async function test_duplicate_alert_words_cannot_be_added(
|
||||||
}
|
}
|
||||||
|
|
||||||
async function delete_alert_word(page: Page, word: string): Promise<void> {
|
async function delete_alert_word(page: Page, word: string): Promise<void> {
|
||||||
const delete_btn_selector = `.remove-alert-word[data-word="${CSS.escape(word)}"]`;
|
const delete_button_selector = `.remove-alert-word[data-word="${CSS.escape(word)}"]`;
|
||||||
await page.click(delete_btn_selector);
|
await page.click(delete_button_selector);
|
||||||
await page.waitForSelector(delete_btn_selector, {hidden: true});
|
await page.waitForSelector(delete_button_selector, {hidden: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function test_alert_word_deletion(page: Page, word: string): Promise<void> {
|
async function test_alert_word_deletion(page: Page, word: string): Promise<void> {
|
||||||
|
|
Loading…
Reference in New Issue