Просмотр исходного кода

add waitUntilSkeletonDisappear after the grw-contextual-navigation-sub is visible

Yuki Takei 2 лет назад
Родитель
Сommit
9179f757eb

+ 5 - 2
apps/app/test/cypress/e2e/20-basic-features/20-basic-features--access-to-page.cy.ts

@@ -207,12 +207,12 @@ context('Access to Template Editing Mode', () => {
 
 
   const createPageFromPageTreeTest = (newPagePath: string, parentPagePath: string, expectedBody: string) => {
   const createPageFromPageTreeTest = (newPagePath: string, parentPagePath: string, expectedBody: string) => {
     cy.visit('/');
     cy.visit('/');
+
+    cy.getByTestid('grw-contextual-navigation-sub').should('be.visible');
     cy.waitUntilSkeletonDisappear();
     cy.waitUntilSkeletonDisappear();
 
 
     // Open sidebar
     // Open sidebar
     cy.collapseSidebar(false);
     cy.collapseSidebar(false);
-    cy.getByTestid('grw-contextual-navigation-sub').should('be.visible');
-    cy.waitUntilSkeletonDisappear();
 
 
     // If PageTree is not active when the sidebar is opened, make it active
     // If PageTree is not active when the sidebar is opened, make it active
     cy.getByTestid('grw-sidebar-nav-primary-page-tree').should('be.visible')
     cy.getByTestid('grw-sidebar-nav-primary-page-tree').should('be.visible')
@@ -233,7 +233,10 @@ context('Access to Template Editing Mode', () => {
     })
     })
 
 
     cy.visit(`/${parentPagePath}/${newPagePath}`);
     cy.visit(`/${parentPagePath}/${newPagePath}`);
+
+    cy.getByTestid('grw-contextual-navigation-sub').should('be.visible');
     cy.waitUntilSkeletonDisappear();
     cy.waitUntilSkeletonDisappear();
+
     cy.collapseSidebar(true);
     cy.collapseSidebar(true);
 
 
     // Check if the template is applied
     // Check if the template is applied

+ 1 - 0
apps/app/test/cypress/e2e/22-sharelink/22-sharelink--access-to-sharelink.cy.ts

@@ -15,6 +15,7 @@ context('Access to sharelink by guest', () => {
     cy.waitUntil(() => {
     cy.waitUntil(() => {
       // do
       // do
       cy.getByTestid('grw-contextual-sub-nav').should('be.visible').within(() => {
       cy.getByTestid('grw-contextual-sub-nav').should('be.visible').within(() => {
+        cy.waitUntilSkeletonDisappear();
         cy.getByTestid('open-page-item-control-btn').find('button').first().as('btn').click();
         cy.getByTestid('open-page-item-control-btn').find('button').first().as('btn').click();
       });
       });
       // wait until
       // wait until