[MM-55285]: Screen reader speaking wrong item in list in Find Channels modal (#29552)

* [MA-11]: Fix Screen reader speaking wrong item in list in Find Channels modal

* [MA-11]: Update types across files

* [MA-11]: Minor refactoring

* [MA-11]: Fix e2e test

* [MA-11]: Fix E2E tests

* [MA-11]: Update role and id

* [MA-11]: Fix playwright tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Saurabh Sharma
2025-01-17 01:05:13 +05:30
коммит произвёл GitHub
родитель 540408545a
Коммит 132c27fb34
38 изменённых файлов: 120 добавлений и 76 удалений

Просмотреть файл

@@ -36,7 +36,7 @@ describe('Settings > Sidebar > Channel Switcher', () => {
cy.get('#quickSwitchHint').should('be.visible').should('contain', 'Type to find a channel. Use UP/DOWN to browse, ENTER to select, ESC to dismiss.');
// # Type CTRL/CMD+shift+L
cy.findByRole('textbox', {name: 'quick switch input'}).cmdOrCtrlShortcut('{shift}L');
cy.findByRole('combobox', {name: 'quick switch input'}).cmdOrCtrlShortcut('{shift}L');
// * Suggestion list should not be visible
cy.get('#suggestionList').should('not.exist');
@@ -56,7 +56,7 @@ describe('Settings > Sidebar > Channel Switcher', () => {
cy.get('#quickSwitchHint').should('be.visible').should('contain', 'Type to find a channel. Use UP/DOWN to browse, ENTER to select, ESC to dismiss.');
// # Type CTRL/CMD+shift+m
cy.findByRole('textbox', {name: 'quick switch input'}).cmdOrCtrlShortcut('{shift}M');
cy.findByRole('combobox', {name: 'quick switch input'}).cmdOrCtrlShortcut('{shift}M');
// * Suggestion list should not be visible
cy.get('#suggestionList').should('not.exist');

Просмотреть файл

@@ -50,14 +50,14 @@ function verifyChannelSwitch(team, channel) {
cy.get('#quickSwitchHint').should('be.visible').should('contain', 'Type to find a channel. Use UP/DOWN to browse, ENTER to select, ESC to dismiss.');
// # Type channel display name on Channel switcher input
cy.findByRole('textbox', {name: 'quick switch input'}).type(channel.display_name);
cy.findByRole('combobox', {name: 'quick switch input'}).type(channel.display_name);
cy.wait(TIMEOUTS.HALF_SEC);
// * Suggestion list should be visible
cy.get('#suggestionList').should('be.visible');
// # Press enter
cy.findByRole('textbox', {name: 'quick switch input'}).type('{enter}');
cy.findByRole('combobox', {name: 'quick switch input'}).type('{enter}');
// * Verify that it redirected into "channel-switcher" as selected channel
cy.url().should('include', `/${team.name}/channels/${channel.name}`);