test: clearup to stop test bleed across projects plus bugfix

This commit is contained in:
AndyWhiteVega 2022-07-08 10:11:44 +01:00
parent 5388b9f811
commit f7aa67e55a
3 changed files with 11 additions and 0 deletions

View File

@ -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) => {

View File

@ -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
});

View File

@ -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');