Browse Source

add cy command

Yohei-Shiina 3 years ago
parent
commit
f5a20fba9a
1 changed files with 8 additions and 0 deletions
  1. 8 0
      packages/app/test/cypress/support/commands.ts

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

@@ -41,6 +41,14 @@ Cypress.Commands.add('login', (username, password) => {
   });
   });
 });
 });
 
 
+/**
+ * use only fot eh page that has skeleton
+ */
+Cypress.Commands.add('waitSkeletonDisappear', () => {
+  cy.get('.grw-skelton').should('not.exist');
+  cy.get('.grw-skelton').should('exist');
+});
+
 let isSidebarCollapsed: boolean | undefined;
 let isSidebarCollapsed: boolean | undefined;
 
 
 Cypress.Commands.add('collapseSidebar', (isCollapsed, force=false) => {
 Cypress.Commands.add('collapseSidebar', (isCollapsed, force=false) => {