From a0144cd67ab9fae89b387fd68d300cdd80c4c12b Mon Sep 17 00:00:00 2001 From: hyesungoh Date: Sun, 12 Nov 2023 18:10:18 +0900 Subject: [PATCH] test: delete wait --- apps/blog/cypress/e2e/root/scroll-restoration.spec.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/blog/cypress/e2e/root/scroll-restoration.spec.ts b/apps/blog/cypress/e2e/root/scroll-restoration.spec.ts index 701abb7d..1c6e43f4 100644 --- a/apps/blog/cypress/e2e/root/scroll-restoration.spec.ts +++ b/apps/blog/cypress/e2e/root/scroll-restoration.spec.ts @@ -2,19 +2,14 @@ describe('root - store restoration', { testIsolation: false }, () => { it('should restore scroll position when go back', () => { const SCROLL_Y_POSITION = 30; - cy.intercept('/').as('visitHome'); cy.visit('/'); - cy.wait('@visitHome'); - cy.window().then($window => { $window.scrollTo(0, SCROLL_Y_POSITION); }); cy.get('main').find('a').first().click(); - cy.wait(3000); - cy.go('back'); - cy.wait(3000); + cy.go('back', { timeout: 10000 }); cy.window().its('scrollY').should('not.eq', 0); });