瀏覽代碼

add cy command

Yohei-Shiina 3 年之前
父節點
當前提交
f5a20fba9a
共有 1 個文件被更改,包括 8 次插入0 次删除
  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;
 
 Cypress.Commands.add('collapseSidebar', (isCollapsed, force=false) => {