fix(custom_buttons): improve sidebar collapse logic to check for expanded state (#34809)

This commit is contained in:
Raffael Meyer 2025-11-21 02:15:54 +01:00 committed by GitHub
parent ea03bd020e
commit dbcb7b608a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,7 +42,12 @@ describe(
cy.login();
cy.visit(`/desk/note/new`);
// close the sidebar cause default is expanded
cy.get(".body-sidebar .collapse-sidebar-link").click();
cy.get(".body-sidebar-container").then(($sidebar) => {
if ($sidebar.hasClass("expanded")) {
cy.get(".body-sidebar .collapse-sidebar-link").click();
cy.get(".body-sidebar-container").should("not.have.class", "expanded");
}
});
});
test_button_names.forEach((button_name) => {