瀏覽代碼

add grw-skeleton exist

Yohei-Shiina 3 年之前
父節點
當前提交
054c492a17
共有 1 個文件被更改,包括 33 次插入33 次删除
  1. 33 33
      packages/app/test/cypress/integration/20-basic-features/access-to-page.spec.ts

+ 33 - 33
packages/app/test/cypress/integration/20-basic-features/access-to-page.spec.ts

@@ -144,57 +144,57 @@ context('Access to Template Editing Mode', () => {
 
   it('Access to Template Editor mode for only child pages successfully', () => {
     cy.visit('/Sandbox/Bootstrap4', {  });
-    cy.get('.grw-skelton').should('not.exist').then(()=>{
 
-      cy.get('#grw-subnav-container').within(() => {
-        cy.getByTestid('open-page-item-control-btn').as('open-page-item-control-btn');
-        cy.get('@open-page-item-control-btn').should('be.visible').click();
+    cy.get('.grw-skelton').should('exist');
+    cy.get('.grw-skelton').should('not.exist');
 
-        cy.getByTestid('open-page-template-modal-btn').as('open-page-template-modal-btn');
-        cy.get('@open-page-template-modal-btn').should('be.visible').click();
-      });
+    cy.get('#grw-subnav-container').within(() => {
+      cy.getByTestid('open-page-item-control-btn').as('open-page-item-control-btn');
+      cy.get('@open-page-item-control-btn').should('be.visible').click();
 
-      cy.getByTestid('page-template-modal').should('be.visible');
-      cy.screenshot(`${ssPrefix}-open-page-template-bootstrap4`);
+      cy.getByTestid('open-page-template-modal-btn').as('open-page-template-modal-btn');
+      cy.get('@open-page-template-modal-btn').should('be.visible').click();
+    });
 
-      cy.getByTestid('template-button-children').as('template-button-children');
-      cy.get('@template-button-children').should('be.visible').click();
+    cy.getByTestid('page-template-modal').should('be.visible');
+    cy.screenshot(`${ssPrefix}-open-page-template-bootstrap4`);
 
-      cy.get('.grw-skelton').should('not.exist').then(()=>{
-        cy.getByTestid('navbar-editor').should('be.visible').then(()=>{
-          cy.url().should('include', '/_template#edit');
-          cy.screenshot();
-        });
-      });
+    cy.getByTestid('template-button-children').as('template-button-children');
+    cy.get('@template-button-children').should('be.visible').click();
 
+    cy.get('.grw-skelton').should('not.exist').then(()=>{
+      cy.getByTestid('navbar-editor').should('be.visible').then(()=>{
+        cy.url().should('include', '/_template#edit');
+        cy.screenshot();
+      });
     });
   });
 
   it('Access to Template Editor mode including decendants successfully', () => {
     cy.visit('/Sandbox/Bootstrap4', {  });
-    cy.get('.grw-skelton').should('not.exist').then(()=>{
 
-      cy.get('#grw-subnav-container').within(() => {
+    cy.get('.grw-skelton').should('exist');
+    cy.get('.grw-skelton').should('not.exist');
 
-        cy.getByTestid('open-page-item-control-btn').as('open-page-item-control-btn');
-        cy.get('@open-page-item-control-btn').should('be.visible').click();
+    cy.get('#grw-subnav-container').within(() => {
 
-        cy.getByTestid('open-page-template-modal-btn').as('open-page-template-modal-btn');
-        cy.get('@open-page-template-modal-btn').should('be.visible').click();
+      cy.getByTestid('open-page-item-control-btn').as('open-page-item-control-btn');
+      cy.get('@open-page-item-control-btn').should('be.visible').click();
 
-      });
-      cy.getByTestid('page-template-modal').should('be.visible');
+      cy.getByTestid('open-page-template-modal-btn').as('open-page-template-modal-btn');
+      cy.get('@open-page-template-modal-btn').should('be.visible').click();
 
-      cy.getByTestid('template-button-decendants').as('template-button-decendants');
-      cy.get('@template-button-decendants').should('be.visible').click();
+    });
+    cy.getByTestid('page-template-modal').should('be.visible');
 
-      cy.get('.grw-skelton').should('not.exist').then(()=>{
-        cy.getByTestid('navbar-editor').should('be.visible').then(()=>{
-          cy.url().should('include', '/__template#edit');
-          cy.screenshot();
-        });
-      });
+    cy.getByTestid('template-button-decendants').as('template-button-decendants');
+    cy.get('@template-button-decendants').should('be.visible').click();
 
+    cy.get('.grw-skelton').should('not.exist').then(()=>{
+      cy.getByTestid('navbar-editor').should('be.visible').then(()=>{
+        cy.url().should('include', '/__template#edit');
+        cy.screenshot();
+      });
     });
   });