From 77ab7b92c6de08832011104d85af97573ccd6121 Mon Sep 17 00:00:00 2001 From: ayush-chauhan233 Date: Tue, 28 Jan 2025 19:42:39 +0530 Subject: [PATCH] [MM-61595]: Removed the unnecessary dialog text from toggle button's aria-label property (#29595) --- .../system_console/support_packet_generation_spec.js | 2 +- .../system_message_not_open_for_edit_spec.js | 2 +- .../__snapshots__/toggle_modal_button.test.tsx.snap | 2 +- .../channel_intro_message/add_members_button.tsx | 3 ++- .../channel_intro_message.test.tsx | 4 ++-- .../profile_popover/profile_popover.test.tsx | 2 +- .../invite_members_button.test.tsx.snap | 3 ++- .../src/components/sidebar/invite_members_button.tsx | 5 ++++- .../channels/src/components/toggle_modal_button.tsx | 12 +----------- .../user_settings_security.test.tsx.snap | 10 ++++++++++ .../security/user_settings_security.tsx | 2 ++ webapp/channels/src/i18n/en.json | 2 -- 12 files changed, 27 insertions(+), 22 deletions(-) diff --git a/e2e-tests/cypress/tests/integration/channels/enterprise/system_console/support_packet_generation_spec.js b/e2e-tests/cypress/tests/integration/channels/enterprise/system_console/support_packet_generation_spec.js index 1f1c67eea7..3e331f1d6d 100644 --- a/e2e-tests/cypress/tests/integration/channels/enterprise/system_console/support_packet_generation_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/enterprise/system_console/support_packet_generation_spec.js @@ -47,7 +47,7 @@ describe('Support Packet Generation', () => { const goToSupportPacketGenerationModal = () => { // # Open system menu and click Customer Support cy.findByRole('button', {name: 'Menu Icon'}).should('exist').click(); - cy.findByRole('button', {name: 'Commercial Support dialog'}).click(); + cy.findByRole('button', {name: 'Commercial Support'}).click(); // * Ensure the download Support Packet button exist and that text regarding setting the proper settings exist cy.get('a.DownloadSupportPacket').should('exist'); diff --git a/e2e-tests/cypress/tests/integration/channels/keyboard_shortcuts/system_message_not_open_for_edit_spec.js b/e2e-tests/cypress/tests/integration/channels/keyboard_shortcuts/system_message_not_open_for_edit_spec.js index e0743d4267..73f67c9d9d 100644 --- a/e2e-tests/cypress/tests/integration/channels/keyboard_shortcuts/system_message_not_open_for_edit_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/keyboard_shortcuts/system_message_not_open_for_edit_spec.js @@ -26,7 +26,7 @@ describe('Keyboard Shortcuts', () => { cy.postMessage(message); // # Open the edit the channel header modal - cy.get('[aria-label="Set header dialog"]').click(); + cy.get('[aria-label="Set header"]').click(); // * Verify modal is open cy.findByRole('dialog', {name: 'Edit Header for Off-Topic'}).within(() => { diff --git a/webapp/channels/src/components/__snapshots__/toggle_modal_button.test.tsx.snap b/webapp/channels/src/components/__snapshots__/toggle_modal_button.test.tsx.snap index 58c7b7f2be..4fb8d6f5a2 100644 --- a/webapp/channels/src/components/__snapshots__/toggle_modal_button.test.tsx.snap +++ b/webapp/channels/src/components/__snapshots__/toggle_modal_button.test.tsx.snap @@ -9,7 +9,7 @@ exports[`components/ToggleModalButton component should match snapshot 1`] = ` role="menuitem" >