Updated fix for failing market test (#392)

* Add additional checks before and after click

* Change back to use cy.contains

* Add assertion before click

* Change assert

* Remove force

* Add click

* Increase timeout
This commit is contained in:
Joe Tsang 2022-05-10 09:20:32 +01:00 committed by GitHub
parent 319e14164d
commit 81ea3fe946
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,8 +55,11 @@ export default class MarketPage extends BasePage {
}
clickOnMarket(text: string) {
cy.get(`[col-id=${this.marketStateColId}]`)
.contains(text)
.click({ force: true });
cy.get(`[col-id=${this.marketStateColId}]`).should('be.visible');
cy.get(`[col-id=${this.marketStateColId}]`).contains(text).click();
cy.url({ timeout: 8000 }).should(
'contain',
'portfolio=orders&trade=orderbook'
);
}
}