Check for 2dp on total staked (#308)
* Check for 2dp on total staked * Update apps/explorer-e2e/src/support/pages/home-page.ts Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com> Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
This commit is contained in:
parent
8ebb2ee81c
commit
de4c5499b9
@ -45,8 +45,13 @@ export default class HomePage extends BasePage {
|
|||||||
|
|
||||||
verifyStatsValuesdisplayed() {
|
verifyStatsValuesdisplayed() {
|
||||||
cy.getByTestId(this.statsValue)
|
cy.getByTestId(this.statsValue)
|
||||||
.each(($value) => {
|
.each(($value, index) => {
|
||||||
cy.wrap($value).should('not.be.empty');
|
cy.wrap($value).should('not.be.empty');
|
||||||
|
if (index == 6) {
|
||||||
|
// Total staked value
|
||||||
|
const totalStakedRegex = /^[0-9]+(\.[0-9]{0,2})?$/;
|
||||||
|
cy.wrap($value).invoke('text').should('match', totalStakedRegex); // Check that value is number with 2dp
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.then(($list) => {
|
.then(($list) => {
|
||||||
cy.wrap($list).should('have.length', 18);
|
cy.wrap($list).should('have.length', 18);
|
||||||
|
Loading…
Reference in New Issue
Block a user