MM-62288 - add e2e to RHS focus functionality (#29655)
* MM-62288 - add e2e to RHS focus functionality * remove describe only * Use existence check before closing RHS * modify close rhs function to not fail when rhs is not opened * avoid body to not get found --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -10,7 +10,12 @@ Cypress.Commands.add('uiGetRHS', (options = {visible: true}) => {
|
||||
});
|
||||
|
||||
Cypress.Commands.add('uiCloseRHS', () => {
|
||||
cy.findByLabelText('Close Sidebar Icon').click();
|
||||
cy.document().then((doc) => {
|
||||
const closeButton = doc.querySelector('[aria-label="Close Sidebar Icon"]');
|
||||
if (closeButton) {
|
||||
closeButton.click();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Cypress.Commands.add('uiExpandRHS', () => {
|
||||
|
||||
Ссылка в новой задаче
Block a user