fix(trading): redirect to markets all page if no market found (#3888)
This commit is contained in:
parent
5280b79927
commit
1699e33cbd
@ -140,8 +140,8 @@ describe('home', { tags: '@regression' }, () => {
|
|||||||
cy.wait('@MarketsData');
|
cy.wait('@MarketsData');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('redirects to a the empty market page and displays welcome notice', () => {
|
it('redirects to market/all and displays welcome notice', () => {
|
||||||
cy.url().should('eq', Cypress.config().baseUrl + `/#/markets`);
|
cy.url().should('eq', Cypress.config().baseUrl + `/#/markets/all`);
|
||||||
cy.getByTestId('welcome-notice-title').should(
|
cy.getByTestId('welcome-notice-title').should(
|
||||||
'contain.text',
|
'contain.text',
|
||||||
'Welcome to Console'
|
'Welcome to Console'
|
||||||
|
@ -30,7 +30,7 @@ export const Home = () => {
|
|||||||
replace: true,
|
replace: true,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
navigate(Links[Routes.MARKET]());
|
navigate(Links[Routes.MARKETS]());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [marketId, data, navigate, update]);
|
}, [marketId, data, navigate, update]);
|
||||||
|
Loading…
Reference in New Issue
Block a user