[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 удалений

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

@@ -31,7 +31,7 @@ export function searchForChannel(name: string) {
cy.typeCmdOrCtrl().type('k').wait(TIMEOUTS.ONE_SEC);
// # Clear out and type in the name
cy.findByRole('textbox', {name: 'quick switch input'}).
cy.findByRole('combobox', {name: 'quick switch input'}).
should('be.visible').
as('input').
clear().

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

@@ -38,7 +38,7 @@ describe('Autocomplete with Elasticsearch - Users', () => {
// # Open quick channel switcher
cy.typeCmdOrCtrl().type('k');
cy.findByRole('textbox', {name: 'quick switch input'}).should('be.visible');
cy.findByRole('combobox', {name: 'quick switch input'}).should('be.visible');
});
});

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

@@ -133,7 +133,7 @@ describe('Verify Guest User Identification in different screens', () => {
cy.uiOpenFindChannels();
// # Type the guest user name on Channel switcher input
cy.findByRole('textbox', {name: 'quick switch input'}).type(guestUser.username).wait(TIMEOUTS.HALF_SEC);
cy.findByRole('combobox', {name: 'quick switch input'}).type(guestUser.username).wait(TIMEOUTS.HALF_SEC);
// * Verify if Guest badge is displayed for the guest user in the Switch Channel Dialog
cy.get('#suggestionList').should('be.visible');

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

@@ -408,7 +408,7 @@ context('ldap', () => {
cy.wait(TIMEOUTS.THREE_SEC);
// # Type channel display name on Channel switcher input
cy.findByRole('textbox', {name: 'quick switch input'}).type(publicChannel.display_name);
cy.findByRole('combobox', {name: 'quick switch input'}).type(publicChannel.display_name);
cy.wait(TIMEOUTS.HALF_SEC);
// * Should open up suggestion list for channels
@@ -433,7 +433,7 @@ context('ldap', () => {
cy.wait(TIMEOUTS.THREE_SEC);
// # Type channel display name on Channel switcher input
cy.findByRole('textbox', {name: 'quick switch input'}).type(publicChannel.display_name);
cy.findByRole('combobox', {name: 'quick switch input'}).type(publicChannel.display_name);
cy.wait(TIMEOUTS.HALF_SEC);
// * Should open up suggestion list for channels