chore(trading): fix flakey trading-trades test (#4363)
Co-authored-by: Matthew Russell <mattrussell36@gmail.com> Co-authored-by: Art <artur@vegaprotocol.io> Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com> Co-authored-by: Dariusz Majcherczyk <dariusz.majcherczyk@gmail.com>
This commit is contained in:
parent
c1675e4b49
commit
47ce68455a
@ -6,16 +6,17 @@ const tradesTab = 'Trades';
|
|||||||
const tradesTable = 'tab-trades';
|
const tradesTable = 'tab-trades';
|
||||||
|
|
||||||
describe('trades', { tags: '@smoke' }, () => {
|
describe('trades', { tags: '@smoke' }, () => {
|
||||||
beforeEach(() => {
|
|
||||||
cy.mockTradingPage();
|
|
||||||
cy.mockSubscription();
|
|
||||||
});
|
|
||||||
|
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.mockTradingPage();
|
cy.mockTradingPage();
|
||||||
cy.mockSubscription();
|
cy.mockSubscription();
|
||||||
|
cy.intercept('POST', '/graphql', (req) => {
|
||||||
|
if (req.body.operationName === 'Trades') {
|
||||||
|
req.alias = '@Trades';
|
||||||
|
}
|
||||||
|
});
|
||||||
cy.visit('/#/markets/market-0');
|
cy.visit('/#/markets/market-0');
|
||||||
cy.getByTestId(tradesTab).click();
|
cy.getByTestId(tradesTab).click();
|
||||||
|
cy.wait('@Trades');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('show trades', () => {
|
it('show trades', () => {
|
||||||
@ -52,8 +53,7 @@ describe('trades', { tags: '@smoke' }, () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// This won't pass in CI, but does locally
|
it('show trades date and time', () => {
|
||||||
it.skip('show trades date and time', () => {
|
|
||||||
// 6005-THIS-005
|
// 6005-THIS-005
|
||||||
cy.getByTestId(tradesTable) // order table shares identical col id
|
cy.getByTestId(tradesTable) // order table shares identical col id
|
||||||
.find(`${colIdCreatedAt} ${colHeader}`)
|
.find(`${colIdCreatedAt} ${colHeader}`)
|
||||||
@ -85,15 +85,9 @@ describe('trades', { tags: '@smoke' }, () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// this passes locally but doesn't in CI
|
it('copy price to deal ticket form', () => {
|
||||||
it.skip('copy price to deal ticket form', () => {
|
|
||||||
cy.getByTestId('order-type-TYPE_LIMIT').click(); // make sure on limit
|
|
||||||
// 6005-THIS-007
|
// 6005-THIS-007
|
||||||
cy.getByTestId(tradesTable)
|
cy.get(colIdPrice).last().should('be.visible').click();
|
||||||
.find(colIdPrice)
|
|
||||||
.last()
|
|
||||||
.should('be.visible')
|
|
||||||
.click();
|
|
||||||
cy.getByTestId('order-price').should('have.value', '171.16898');
|
cy.getByTestId('order-price').should('have.value', '171.16898');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user