chore: attempt to fix home tests (#1311)

* chore: attempt to fix home tests

* chore: revert timeout increase

* chore: visit homepage in hook
This commit is contained in:
Joe Tsang 2022-09-12 13:56:01 +01:00 committed by GitHub
parent 846f9114d8
commit 8b08e48840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,17 +4,15 @@ import { mockTradingPage } from '../support/trading';
describe('home', () => {
const selectMarketOverlay = 'select-market-list';
beforeEach('load homepage', () => {
beforeEach(() => {
cy.mockGQL((req) => {
mockTradingPage(req, MarketState.STATE_ACTIVE);
});
cy.visit('/');
});
describe('default market found', () => {
it('redirects to a default market with the landing dialog open', () => {
cy.mockGQL((req) => {
// Mock all market page queries
mockTradingPage(req, MarketState.STATE_ACTIVE);
});
cy.visit('/');
cy.wait('@Market');