From f7aa67e55a0f6f7bc9d3f0f8442466cd03083239 Mon Sep 17 00:00:00 2001 From: AndyWhiteVega Date: Fri, 8 Jul 2022 10:11:44 +0100 Subject: [PATCH] test: clearup to stop test bleed across projects plus bugfix --- apps/token-e2e/src/integration/flow/staking-flow.cy.js | 7 +++++++ apps/trading-e2e/src/integration/home.cy.ts | 3 +++ apps/trading-e2e/src/integration/markets.cy.ts | 1 + 3 files changed, 11 insertions(+) diff --git a/apps/token-e2e/src/integration/flow/staking-flow.cy.js b/apps/token-e2e/src/integration/flow/staking-flow.cy.js index 0cc6dd188..87e094505 100644 --- a/apps/token-e2e/src/integration/flow/staking-flow.cy.js +++ b/apps/token-e2e/src/integration/flow/staking-flow.cy.js @@ -253,6 +253,13 @@ context('Staking Tab - with eth and vega wallets connected', function () { '2.000000000000000000' ); }); + + after( + 'teardown wallet so state/results dont bleed into other test suites', + function () { + cy.vega_wallet_teardown(); + } + ); }); cy.staking_validator_page_check_stake_next_epoch_value = (expectedVal) => { diff --git a/apps/trading-e2e/src/integration/home.cy.ts b/apps/trading-e2e/src/integration/home.cy.ts index 8ab4f454b..3d7c0724a 100644 --- a/apps/trading-e2e/src/integration/home.cy.ts +++ b/apps/trading-e2e/src/integration/home.cy.ts @@ -34,7 +34,10 @@ describe('home', () => { cy.visit('/'); cy.wait('@GQL'); + cy.contains('Loading...').should('be.visible'); + cy.contains('Loading...').should('not.exist') cy.get('main[data-testid="market"]').should('exist'); // Wait for page to be rendered to before checking url + cy.url().should('include', `/markets/${oldestMarket.id}`); // Should redirect to oldest market }); diff --git a/apps/trading-e2e/src/integration/markets.cy.ts b/apps/trading-e2e/src/integration/markets.cy.ts index 0c9b6b8a0..0ac5c0d4d 100644 --- a/apps/trading-e2e/src/integration/markets.cy.ts +++ b/apps/trading-e2e/src/integration/markets.cy.ts @@ -69,6 +69,7 @@ describe('markets table', () => { cy.get('[role="gridcell"][col-id=data]').contains('Active').click(); cy.wait('@Market'); + cy.get('.ag-root-wrapper').should('be.visible'); cy.contains('ACTIVE MARKET'); cy.url().should('include', '/markets/market-0');