Improve Trade cypress test

This commit is contained in:
Matthias 2022-12-04 09:03:46 +01:00
parent 0207612fd4
commit 72a8f9cf66

View File

@ -12,10 +12,11 @@ function tradeMocks() {
}
describe('Trade', () => {
it('Trade view', () => {
it('Trade view', { scrollBehavior: false }, () => {
defaultMocks();
tradeMocks();
setLoginInfo();
cy.viewport('macbook-11');
cy.visit('/trade');
cy.wait('@Ping');
@ -28,11 +29,16 @@ describe('Trade', () => {
cy.wait('@Locks');
cy.wait('@Performance');
cy.get('.drag-header').contains('Multi Pane').should('be.visible');
cy.get('.drag-header').contains('Chart').should('be.visible');
cy.get('button').should('contain', 'BTC/USDT');
cy.get('button').should('contain', 'ETH/USDT').should('be.visible');
cy.get('button').contains('ETH/USDT').should('be.visible');
cy.get('button[role="tab"]').contains('General').click();
cy.get('button').contains('ETH/USDT').should('not.be.visible');
cy.get('.drag-header').contains('Open Trades').scrollIntoView().should('be.visible');
cy.get('.drag-header').contains('Closed Trades').scrollIntoView().should('be.visible');
cy.get('span').contains('TRX/USDT').should('be.visible');
cy.get('td').contains('8070.5').should('be.visible');
});
});