Browse Source

Scroll top

Taichi Masuyama 3 years ago
parent
commit
836487c50d
1 changed files with 6 additions and 0 deletions
  1. 6 0
      packages/app/test/cypress/integration/30-search/search.spec.ts

+ 6 - 0
packages/app/test/cypress/integration/30-search/search.spec.ts

@@ -129,6 +129,8 @@ context('Search all pages', () => {
     // Duplicate page
     cy.getByTestid('open-page-duplicate-modal-btn').first().click({force: true});
     cy.getByTestid('page-duplicate-modal').should('be.visible');
+    // for avoid mismatch by auto scrolling
+    cy.get('.search-result-content-body-container').scrollTo('top');
     cy.screenshot(`${ssPrefix}6-duplicate-page`, {capture: 'viewport'});
 
     // Close Modal
@@ -137,6 +139,8 @@ context('Search all pages', () => {
     // Move / Rename Page
     cy.getByTestid('open-page-move-rename-modal-btn').first().click({force: true});
     cy.getByTestid('page-rename-modal').should('be.visible');
+    // for avoid mismatch by auto scrolling
+    cy.get('.search-result-content-body-container').scrollTo('top');
     cy.screenshot(`${ssPrefix}7-move-rename-page`, {capture: 'viewport'});
 
     // Close Modal
@@ -145,6 +149,8 @@ context('Search all pages', () => {
     // Delete page
     cy.getByTestid('open-page-delete-modal-btn').first().click({ force: true});
     cy.getByTestid('page-delete-modal').should('be.visible');
+    // for avoid mismatch by auto scrolling
+    cy.get('.search-result-content-body-container').scrollTo('top');
     cy.screenshot(`${ssPrefix}8-delete-page`, {capture: 'viewport'});
   });