[MM-61640]: Add descriptive accessible names (#29928)
* [MA-57]: Add descriptive accessible names * [MA-57]: Updated unread message to be translatable * [MA-57]: Fixed failing e2e test cases * [MA-57]: Added Type definition for channel sidebar helper function and fixed failing e2e test case * rm capitalize --------- Co-authored-by: ayush-chauhan233 <ayush.chauhan@brightscout.com> Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: M-ZubairAhmed <m-zubairahmed@protonmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7d2f0c2c31
Коммит
cc92ee79c9
@@ -3,10 +3,17 @@
|
||||
|
||||
import * as TIMEOUTS from '../../../fixtures/timeouts';
|
||||
|
||||
export function clickCategoryMenuItem(categoryDisplayName, menuItemText, isSubMenu = false) {
|
||||
type ClickCategoryMenuItemProps = {
|
||||
categoryDisplayName: string;
|
||||
menuItemText: string;
|
||||
categoryMenuButtonName?: string;
|
||||
isSubMenu?: boolean;
|
||||
}
|
||||
|
||||
export function clickCategoryMenuItem({categoryDisplayName, menuItemText, categoryMenuButtonName = categoryDisplayName, isSubMenu = false}: ClickCategoryMenuItemProps) {
|
||||
cy.get('#SidebarContainer').should('be.visible').within(() => {
|
||||
cy.findByText(categoryDisplayName).should('exist').parents('.SidebarChannelGroupHeader').within(() => {
|
||||
cy.findByLabelText('Category options').should('exist').click({force: true});
|
||||
cy.findByLabelText(`${categoryMenuButtonName} category options`).should('exist').click({force: true});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -22,7 +29,7 @@ export function clickCategoryMenuItem(categoryDisplayName, menuItemText, isSubMe
|
||||
}
|
||||
|
||||
export function clickSortCategoryMenuItem(categoryDisplayName, menuItemText) {
|
||||
clickCategoryMenuItem(categoryDisplayName, 'Sort', true);
|
||||
clickCategoryMenuItem({categoryDisplayName, menuItemText: 'Sort', isSubMenu: true});
|
||||
|
||||
cy.wait(TIMEOUTS.HALF_SEC);
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user