Test/fix failing regex with comma (#329)
* Update regex to include commas * Add force true to clicking on transaction
This commit is contained in:
parent
2b910aa04c
commit
48f66a9ce8
@ -49,7 +49,7 @@ export default class HomePage extends BasePage {
|
||||
cy.wrap($value).should('not.be.empty');
|
||||
if (index == 6) {
|
||||
// Total staked value
|
||||
const totalStakedRegex = /^[0-9]+(\.[0-9]{0,2})?$/;
|
||||
const totalStakedRegex = /^\d{1,3}(,\d{3})*(\.\d{1,2})?$/;
|
||||
cy.wrap($value).invoke('text').should('match', totalStakedRegex); // Check that value is number with 2dp
|
||||
}
|
||||
})
|
||||
|
@ -73,7 +73,11 @@ export default class TransactionsPage extends BasePage {
|
||||
cy.wait(1000); // Wait for transactions to load if there are any
|
||||
cy.get('body').then(($body) => {
|
||||
if ($body.find(`[data-testid=${this.transactionRow}]`).length) {
|
||||
cy.getByTestId(this.transactionRow).first().find('a').first().click();
|
||||
cy.getByTestId(this.transactionRow)
|
||||
.first()
|
||||
.find('a')
|
||||
.first()
|
||||
.click({ force: true });
|
||||
} else {
|
||||
cy.slack('Unable to find any transactions on page');
|
||||
cy.screenshot();
|
||||
|
Loading…
Reference in New Issue
Block a user