|
@@ -46,6 +46,11 @@ Cypress.Commands.add('collapseSidebar', (isCollapsed, force=false) => {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ const isGrowiPage = Cypress.$('body.growi').length > 0;
|
|
|
|
|
+ if (!isGrowiPage) {
|
|
|
|
|
+ cy.visit('/page-to-toggle-sidebar-collapsed');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
cy.getByTestid('grw-contextual-navigation-sub').then(($contents) => {
|
|
cy.getByTestid('grw-contextual-navigation-sub').then(($contents) => {
|
|
|
const isCurrentCollapsed = $contents.hasClass('d-none');
|
|
const isCurrentCollapsed = $contents.hasClass('d-none');
|
|
|
// toggle when the current state and isCoolapsed is not match
|
|
// toggle when the current state and isCoolapsed is not match
|