[MM-61966] "Browse or Create channel" menu on the right of team drop-down should use a11y supported menu (#29739)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c205398040
Коммит
1373c05931
@@ -11,7 +11,7 @@ Cypress.Commands.add('uiCreateChannel', ({
|
||||
name = '',
|
||||
createBoard = '',
|
||||
}) => {
|
||||
cy.uiBrowseOrCreateChannel('Create new channel').click();
|
||||
cy.uiBrowseOrCreateChannel('Create new channel');
|
||||
|
||||
cy.get('#new-channel-modal').should('be.visible');
|
||||
if (isPrivate) {
|
||||
|
||||
@@ -13,11 +13,8 @@ import {getRandomId} from '../../utils';
|
||||
* cy.uiCreateSidebarCategory();
|
||||
*/
|
||||
function uiCreateSidebarCategory(categoryName: string = `category-${getRandomId()}`): ChainableT<any> {
|
||||
// # Click the New Category/Channel Dropdown button
|
||||
cy.uiGetLHSAddChannelButton().click();
|
||||
|
||||
// # Click the Create new category dropdown item
|
||||
cy.get('.AddChannelDropdown').should('be.visible').contains('.MenuItem', 'Create new category').click();
|
||||
// # Click on the sidebar menu dropdown and select Create Category
|
||||
cy.uiBrowseOrCreateChannel('Create new category');
|
||||
|
||||
cy.findByRole('dialog', {name: 'Rename Category'}).should('be.visible').within(() => {
|
||||
// # Fill in the category name and click 'Create'
|
||||
|
||||
@@ -31,8 +31,7 @@ Cypress.Commands.add('uiOpenTeamMenu', (item = '') => {
|
||||
});
|
||||
|
||||
Cypress.Commands.add('uiGetLHSAddChannelButton', () => {
|
||||
return cy.uiGetLHS().
|
||||
find('.AddChannelDropdown_dropdownButton');
|
||||
return cy.uiGetLHS().findByRole('button', {name: 'Browse or create channels'});
|
||||
});
|
||||
|
||||
Cypress.Commands.add('uiGetLHSTeamMenu', () => {
|
||||
@@ -88,15 +87,16 @@ Cypress.Commands.add('uiGetLhsSection', (section) => {
|
||||
parent();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('uiBrowseOrCreateChannel', (item) => {
|
||||
cy.get('.AddChannelDropdown_dropdownButton').
|
||||
should('be.visible').
|
||||
click();
|
||||
cy.get('.dropdown-menu').should('be.visible');
|
||||
Cypress.Commands.add('uiBrowseOrCreateChannel', (menuitem) => {
|
||||
cy.uiGetLHSAddChannelButton().should('be.visible').click();
|
||||
|
||||
if (item) {
|
||||
cy.findByRole('menuitem', {name: item});
|
||||
}
|
||||
cy.get('#browserOrAddChannelMenu').
|
||||
should('exist').and('be.visible').
|
||||
within(() => {
|
||||
if (menuitem) {
|
||||
cy.findByText(menuitem).should('exist').click();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Cypress.Commands.add('uiAddDirectMessage', () => {
|
||||
|
||||
Ссылка в новой задаче
Block a user