From e5bcc1dc960b75dcfc3bcc45e450c8e15701820a Mon Sep 17 00:00:00 2001 From: Dariusz Majcherczyk Date: Fri, 17 Feb 2023 09:44:37 +0100 Subject: [PATCH] test: wait for hash --- apps/trading-e2e/src/integration/navbar.cy.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/trading-e2e/src/integration/navbar.cy.ts b/apps/trading-e2e/src/integration/navbar.cy.ts index 3ca646da3..9cf0670ff 100644 --- a/apps/trading-e2e/src/integration/navbar.cy.ts +++ b/apps/trading-e2e/src/integration/navbar.cy.ts @@ -23,9 +23,10 @@ describe('Desktop view', { tags: '@smoke' }, () => { cy.wrap(element) .get('span.absolute.md\\:h-1.w-full') .should('exist'); - cy.location('hash').should('equal', hashes[index], { - timeout: 300, - }); + cy.location('hash', { timeout: 300 }).should( + 'equal', + hashes[index] + ); }); }); }); @@ -70,9 +71,11 @@ describe('Mobile view', { tags: '@smoke' }, () => { cy.getByTestId('button-menu-drawer').click(); cy.getByTestId('menu-drawer').within((el) => { cy.wrap(el).getByTestId('Trading').click(); - cy.location('hash').should('equal', '#/markets/market-1', { - timeout: 300, - }); + + cy.location('hash', { timeout: 300 }).should( + 'equal', + '#/markets/market-1' + ); }); }); it('Portfolio should be correctly rendered', () => {