jam411 3 лет назад
Родитель
Сommit
7f82a1e0bf

+ 4 - 4
packages/app/test/cypress/integration/20-basic-features/click-page-icons.spec.ts

@@ -14,13 +14,13 @@ context('Click page icons button', () => {
     cy.visit('/Sandbox');
     cy.get('#grw-subnav-container').within(() => {
       // Subscribe
-      cy.get('#subscribe-button').eq(0).click({force: true});
-      cy.get('#subscribe-button').eq(0).should('have.class', 'active');
+      cy.get('#subscribe-button').click({force: true});
+      cy.get('#subscribe-button').should('have.class', 'active');
       cy.screenshot(`${ssPrefix}1-subscribe-page`);
 
       // Unsubscribe
-      cy.get('#subscribe-button.active').eq(0).click({force: true});
-      cy.get('#subscribe-button').eq(0).should('not.have.class', 'active');
+      cy.get('#subscribe-button.active').click({force: true});
+      cy.get('#subscribe-button').should('not.have.class', 'active');
       cy.screenshot(`${ssPrefix}2-unsubscribe-page`);
     });
   });

+ 3 - 3
packages/app/test/cypress/integration/20-basic-features/use-tools.spec.ts

@@ -54,7 +54,7 @@ context('Modal for page operation', () => {
     });
     cy.getByTestid('page-editor').should('be.visible');
     cy.getByTestid('save-page-btn').click();
-    cy.get('.layout-root').should('not.have.class', 'editing');
+    cy.get('.layout-root', { timeout: 10000 }).should('not.have.class', 'editing');
 
     cy.getByTestid('grw-contextual-sub-nav').should('be.visible');
     cy.screenshot(`${ssPrefix}create-today-page`);
@@ -72,7 +72,7 @@ context('Modal for page operation', () => {
     });
     cy.getByTestid('page-editor').should('be.visible');
     cy.getByTestid('save-page-btn').click();
-    cy.get('.layout-root').should('not.have.class', 'editing');
+    cy.get('.layout-root', { timeout: 10000 }).should('not.have.class', 'editing');
 
     cy.getByTestid('grw-contextual-sub-nav').should('be.visible');
     cy.screenshot(`${ssPrefix}create-page-under-specific-page`);
@@ -178,7 +178,7 @@ context('Page Accessories Modal', () => {
   it('Page History is shown successfully', () => {
      cy.visit('/Sandbox/Bootstrap4', {  });
      cy.get('#grw-subnav-container').within(() => {
-       cy.getByTestid('open-page-item-control-btn').click();
+       cy.getByTestid('open-page-item-control-btn').eq(0).click();
        cy.getByTestid('open-page-accessories-modal-btn-with-history-tab').click();
     });
 

+ 1 - 1
packages/app/test/cypress/integration/50-sidebar/access-to-side-bar.spec.ts

@@ -60,7 +60,7 @@ context('Access to sidebar', () => {
     cy.get('.CodeMirror textarea').type(content, {force: true});
     cy.screenshot(`${ssPrefix}custom-sidebar-2-custom-sidebar-editor`);
     cy.getByTestid('save-page-btn').click();
-    cy.get('.layout-root').should('not.have.class', 'editing');
+    cy.get('.layout-root', { timeout: 10000 }).should('not.have.class', 'editing');
 
     // What to do when UserUISettings is not saved in time
     cy.getByTestid('grw-sidebar-nav-primary-custom-sidebar').then(($el) => {