From 72a8f9cf6646bc565b4dc99f9368d1679eeb3645 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 4 Dec 2022 09:03:46 +0100 Subject: [PATCH] Improve Trade cypress test --- cypress/e2e/trade.cy.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/trade.cy.ts b/cypress/e2e/trade.cy.ts index 6ae2badc..f0b94e08 100644 --- a/cypress/e2e/trade.cy.ts +++ b/cypress/e2e/trade.cy.ts @@ -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'); }); });