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

Merge pull request #6993 from weseek/fix/109694-normalize-vrt

fix: Normalize VRT (20-basic-features/access-to-pagelist.spec.ts/access-to-pagelist-6-page-list-modal-size-normal.png)
Shun Miyazawa 3 лет назад
Родитель
Сommit
6ef4a6b1b3

+ 12 - 3
packages/app/test/cypress/integration/20-basic-features/access-to-pagelist.spec.ts

@@ -45,20 +45,29 @@ context('Access to pagelist', () => {
 
   it('Successfully expand and close modal', () => {
     cy.visit('/');
+
+    cy.waitUntilSkeletonDisappear();
     cy.getByTestid('pageListButton').click({force: true});
     cy.getByTestid('page-accessories-modal').parent().should('have.class','show');
-    cy.screenshot(`${ssPrefix}6-page-list-modal-size-normal`, {capture: 'viewport'});
+    cy.getByTestid('page-list-item-L').should('be.visible');
+
+    // Wait until the string "You cannot see this page" is no longer displayed
+    cy.getByTestid('page-list-item-L').eq(0).within(() => {
+      cy.get('.icon-exclamation').should('not.exist');
+    });
+
+    cy.screenshot(`${ssPrefix}6-page-list-modal-size-normal`);
     cy.getByTestid('page-accessories-modal').parent().should('have.class','show').within(() => {
       cy.get('button.close').eq(0).click();
     });
 
-    cy.screenshot(`${ssPrefix}7-page-list-modal-size-fullscreen`, {capture: 'viewport'});
+    cy.screenshot(`${ssPrefix}7-page-list-modal-size-fullscreen`);
 
     cy.getByTestid('page-accessories-modal').parent().should('have.class','show').within(() => {
       cy.get('button.close').eq(1).click();
     });
 
-    cy.screenshot(`${ssPrefix}8-close-page-list-modal`, {capture: 'viewport'});
+    cy.screenshot(`${ssPrefix}8-close-page-list-modal`);
   });
 });