From 09fc02f72c3f2ec55f9ee89819f2c49be25bd21d Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Wed, 10 Dec 2025 16:14:29 -0500 Subject: [PATCH] Fix flaky test in accessibility_modals_dialogs_spec.ts (#34689) --- .../accessibility/accessibility_modals_dialogs_spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e2e-tests/cypress/tests/integration/channels/enterprise/accessibility/accessibility_modals_dialogs_spec.ts b/e2e-tests/cypress/tests/integration/channels/enterprise/accessibility/accessibility_modals_dialogs_spec.ts index 3418c0b0f5d..695eb809682 100644 --- a/e2e-tests/cypress/tests/integration/channels/enterprise/accessibility/accessibility_modals_dialogs_spec.ts +++ b/e2e-tests/cypress/tests/integration/channels/enterprise/accessibility/accessibility_modals_dialogs_spec.ts @@ -186,7 +186,9 @@ describe('Verify Accessibility Support in Modals & Dialogs', () => { should('have.attr', 'aria-live', 'polite'). and('have.attr', 'aria-atomic', 'true'). invoke('text').then((text) => { - expect(text).equal(selectedRowText); + // Check that the readout starts with the selected user since it may be followed by + // "Already in Channel" depending on which user was selected + expect(text).to.match(new RegExp(`^${selectedRowText}\\b`)); }); // # Search for an invalid text and check if reader can read no results