diff --git a/apps/governance-e2e/src/integration/flow/staking-flow.cy.ts b/apps/governance-e2e/src/integration/flow/staking-flow.cy.ts index c5e67fd51..ef0160218 100644 --- a/apps/governance-e2e/src/integration/flow/staking-flow.cy.ts +++ b/apps/governance-e2e/src/integration/flow/staking-flow.cy.ts @@ -262,10 +262,10 @@ context( '2' ); waitForBeginningOfEpoch(); - cy.getByTestId(stakeValidatorListStakePercentage).should( - 'have.text', - '50.02%' - ); + cy.getByTestId( + stakeValidatorListStakePercentage, + epochTimeout + ).should('have.text', '50.02%'); navigateTo(navigation.validators); validateValidatorListTotalStakeAndShare('0', '3,002.00', '50.02%'); } diff --git a/apps/governance-e2e/src/support/staking.functions.ts b/apps/governance-e2e/src/support/staking.functions.ts index e8ad75851..51865bad1 100644 --- a/apps/governance-e2e/src/support/staking.functions.ts +++ b/apps/governance-e2e/src/support/staking.functions.ts @@ -170,21 +170,20 @@ export function clickOnValidatorFromList( validatorName = null ) { cy.contains('Loading...', epochTimeout).should('not.exist'); - waitForBeginningOfEpoch(); // below is to ensure validator list is shown cy.get(stakeValidatorListName, { timeout: 10000 }).should('exist'); cy.get(stakeValidatorListPendingStake, txTimeout).should( 'not.contain', '2,000,000,000,000,000,000.00' // number due to bug #936 ); + waitForBeginningOfEpoch(); if (validatorName) { cy.contains(validatorName).click(); } else { cy.get(`[row-id="${validatorNumber}"]`) .should('be.visible') .first() - .as('validatorOnList'); - cy.get('@validatorOnList').click(); + .click(); } } @@ -196,6 +195,7 @@ export function validateValidatorListTotalStakeAndShare( cy.contains('Loading...', epochTimeout).should('not.exist'); waitForBeginningOfEpoch(); cy.get(`[row-id="${positionOnList}"]`) + .should('have.length', 2) .eq(1) .within(() => { cy.getByTestId(stakeValidatorListTotalStake, epochTimeout).should(