From 15cc27af6e86004884081cba8c0083e5f17c9cd1 Mon Sep 17 00:00:00 2001 From: Sayam Samal Date: Wed, 13 Nov 2024 19:21:17 +0530 Subject: [PATCH] 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. --- web/e2e-tests/settings.test.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/web/e2e-tests/settings.test.ts b/web/e2e-tests/settings.test.ts index 6db588f7d1..91ec7b086c 100644 --- a/web/e2e-tests/settings.test.ts +++ b/web/e2e-tests/settings.test.ts @@ -193,8 +193,8 @@ async function test_botserverrc(page: Page): Promise { async function test_edit_bot_form(page: Page): Promise { return; const bot1_email = "1-bot@zulip.testserver"; - const bot1_edit_btn = `.open_edit_bot_form[data-email="${CSS.escape(bot1_email)}"]`; - await page.click(bot1_edit_btn); + const bot1_edit_button = `.open_edit_bot_form[data-email="${CSS.escape(bot1_email)}"]`; + await page.click(bot1_edit_button); const edit_form_selector = `#bot-edit-form[data-email="${CSS.escape(bot1_email)}"]`; await page.waitForSelector(edit_form_selector, {visible: true}); @@ -204,8 +204,8 @@ async function test_edit_bot_form(page: Page): Promise { ); await common.fill_form(page, edit_form_selector, {full_name: "Bot one"}); - const save_btn_selector = "#user-profile-modal .dialog_submit_button"; - await page.click(save_btn_selector); + const save_button_selector = "#user-profile-modal .dialog_submit_button"; + await page.click(save_button_selector); // 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}); @@ -227,8 +227,8 @@ async function test_edit_bot_form(page: Page): Promise { async function test_invalid_edit_bot_form(page: Page): Promise { return; const bot1_email = "1-bot@zulip.testserver"; - const bot1_edit_btn = `.open_edit_bot_form[data-email="${CSS.escape(bot1_email)}"]`; - await page.click(bot1_edit_btn); + const bot1_edit_button = `.open_edit_bot_form[data-email="${CSS.escape(bot1_email)}"]`; + await page.click(bot1_edit_button); const edit_form_selector = `#bot-edit-form[data-email="${CSS.escape(bot1_email)}"]`; await page.waitForSelector(edit_form_selector, {visible: true}); @@ -238,8 +238,8 @@ async function test_invalid_edit_bot_form(page: Page): Promise { ); await common.fill_form(page, edit_form_selector, {full_name: "Bot 2"}); - const save_btn_selector = "#user-profile-modal .dialog_submit_button"; - await page.click(save_btn_selector); + const save_button_selector = "#user-profile-modal .dialog_submit_button"; + await page.click(save_button_selector); // The form should not get closed on saving. Errors should be visible on the form. await common.wait_for_micromodal_to_open(page); @@ -301,8 +301,8 @@ async function get_alert_words_status_text(page: Page): Promise { } async function close_alert_words_status(page: Page): Promise { - const status_close_btn = ".close-alert-word-status"; - await page.click(status_close_btn); + const status_close_button = ".close-alert-word-status"; + await page.click(status_close_button); 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 { - const delete_btn_selector = `.remove-alert-word[data-word="${CSS.escape(word)}"]`; - await page.click(delete_btn_selector); - await page.waitForSelector(delete_btn_selector, {hidden: true}); + const delete_button_selector = `.remove-alert-word[data-word="${CSS.escape(word)}"]`; + await page.click(delete_button_selector); + await page.waitForSelector(delete_button_selector, {hidden: true}); } async function test_alert_word_deletion(page: Page, word: string): Promise {