浏览代码

put back collapseSidebar

Yuken Tezuka 3 年之前
父节点
当前提交
b8f73b0e14
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      packages/app/test/cypress/support/commands.ts

+ 5 - 0
packages/app/test/cypress/support/commands.ts

@@ -46,6 +46,11 @@ Cypress.Commands.add('collapseSidebar', (isCollapsed, force=false) => {
     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) => {
     const isCurrentCollapsed = $contents.hasClass('d-none');
     // toggle when the current state and isCoolapsed is not match