test(trading): fix test for release v0.21.2 (#4806)

This commit is contained in:
daro-maj 2023-09-18 08:40:35 +02:00 committed by GitHub
parent 8b19572dc9
commit f3e2fe746d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 6 deletions

View File

@ -1,5 +1,8 @@
name: (CI) Console tests name: (CI) Console tests
env:
VEGA_VERSION: v0.72.14
on: on:
workflow_call: workflow_call:
inputs: inputs:
@ -11,7 +14,7 @@ jobs:
run-tests: run-tests:
name: run-tests name: run-tests
runs-on: console-test runs-on: console-test
timeout-minutes: 20 timeout-minutes: 40
steps: steps:
#---------------------------------------------- #----------------------------------------------
# check-out frontend-monorepo # check-out frontend-monorepo
@ -78,7 +81,8 @@ jobs:
#---------------------------------------------- #----------------------------------------------
- name: Install vega binaries - name: Install vega binaries
working-directory: ./console-test working-directory: ./console-test
run: poetry run python -m vega_sim.tools.load_binaries --force if: steps.vega_binaries_cache.outputs.cache-hit != 'true'
run: poetry run python -m vega_sim.tools.load_binaries --force --version $VEGA_VERSION
#---------------------------------------------- #----------------------------------------------
# install playwright # install playwright
#---------------------------------------------- #----------------------------------------------

View File

@ -24,9 +24,7 @@ describe('deal ticker order validation', { tags: '@smoke' }, () => {
beforeEach(() => { beforeEach(() => {
cy.mockTradingPage(); cy.mockTradingPage();
cy.getByTestId('deal-ticket-fee-margin-required').within(() => { cy.getByTestId('deal-ticket-fee-margin-required').click();
cy.get('button').click();
});
}); });
describe('limit order', () => { describe('limit order', () => {
@ -111,6 +109,7 @@ describe('deal ticker order validation', { tags: '@smoke' }, () => {
'Total margin available100.01 tDAI' 'Total margin available100.01 tDAI'
); );
}); });
cy.getByTestId('deal-ticket-fee-margin-required').click();
}); });
it('must have current margin allocation', () => { it('must have current margin allocation', () => {
@ -120,6 +119,7 @@ describe('deal ticker order validation', { tags: '@smoke' }, () => {
'Current margin allocation' 'Current margin allocation'
); );
}); });
cy.getByTestId('deal-ticket-fee-margin-required').click();
}); });
it('should open usage breakdown dialog when clicked on current margin allocation', () => { it('should open usage breakdown dialog when clicked on current margin allocation', () => {
@ -128,6 +128,7 @@ describe('deal ticker order validation', { tags: '@smoke' }, () => {
}); });
cy.getByTestId('usage-breakdown').should('exist'); cy.getByTestId('usage-breakdown').should('exist');
cy.getByTestId('dialog-close').click(); cy.getByTestId('dialog-close').click();
cy.getByTestId('deal-ticket-fee-margin-required').click();
}); });
}); });
}); });

View File

@ -86,8 +86,8 @@ describe('trades', { tags: '@smoke' }, () => {
}); });
it('copy price to deal ticket form', () => { it('copy price to deal ticket form', () => {
cy.getByTestId('Order').click();
// 6005-THIS-007 // 6005-THIS-007
cy.getByTestId('order-type-Limit').click();
cy.get(colIdPrice).last().should('be.visible').click(); cy.get(colIdPrice).last().should('be.visible').click();
cy.getByTestId('order-price').should('have.value', '171.16898'); cy.getByTestId('order-price').should('have.value', '171.16898');
}); });