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>
Этот коммит содержится в:
Pablo Vélez
2025-01-14 08:04:08 -05:00
коммит произвёл GitHub
родитель 94ae7905ad
Коммит c01f212f60
4 изменённых файлов: 86 добавлений и 6 удалений

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

@@ -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', () => {