From d08bd4fce194c1bef0c6472103f329621bfc0cc4 Mon Sep 17 00:00:00 2001 From: Dariusz Majcherczyk Date: Thu, 18 May 2023 21:02:00 +0200 Subject: [PATCH] test: remove unnecessary visit --- .../src/integration/home-node-network.cy.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/trading-e2e/src/integration/home-node-network.cy.ts b/apps/trading-e2e/src/integration/home-node-network.cy.ts index 8e67aea87..01abd5c96 100644 --- a/apps/trading-e2e/src/integration/home-node-network.cy.ts +++ b/apps/trading-e2e/src/integration/home-node-network.cy.ts @@ -2,9 +2,10 @@ const dialogContent = 'dialog-content'; const nodeHealth = 'node-health'; describe('home', { tags: '@regression' }, () => { - beforeEach(() => { + before(() => { cy.mockTradingPage(); cy.mockSubscription(); + cy.visit('/'); }); describe('footer', () => { @@ -13,7 +14,6 @@ describe('home', { tags: '@regression' }, () => { // 0006-NETW-008 // 0006-NETW-009 // 0006-NETW-011 - cy.visit('/'); cy.getByTestId(nodeHealth) .children() .first() @@ -71,10 +71,15 @@ describe('home', { tags: '@regression' }, () => { }); }); describe('Network switcher', () => { + before(() => { + cy.mockTradingPage(); + cy.mockSubscription(); + cy.visit('/'); + }); + // 0006-NETW-002 // 0006-NETW-003 - it('switch network dropdown', () => { - cy.visit('/'); + it('switch to fairground network', () => { cy.getByTestId('network-switcher').click(); cy.getByTestId('network-item').contains('Fairground testnet').click(); cy.get('[aria-haspopup="menu"]').should('contain.text', 'Fairground');