diff --git a/apps/token-e2e/src/integration/flow/staking-flow.cy.js b/apps/token-e2e/src/integration/flow/staking-flow.cy.js index 63aa2f35e..da5f6849a 100644 --- a/apps/token-e2e/src/integration/flow/staking-flow.cy.js +++ b/apps/token-e2e/src/integration/flow/staking-flow.cy.js @@ -1,6 +1,6 @@ /// <reference types="cypress" /> -const stakeValidatorListTotalStake = '[col-id="totalStakeThisEpoch"]'; -const stakeValidatorListTotalShare = '[col-id="share"]'; +const stakeValidatorListTotalStake = '[col-id="stake"] > div > span'; +const stakeValidatorListTotalShare = '[col-id="stakeShare"] > div > span'; const stakeValidatorListValidatorStake = '[col-id="validatorStake"]'; const stakeRemoveStakeRadioButton = '[data-testid="remove-stake-radio"]'; const stakeTokenAmountInputBox = '[data-testid="token-amount-input"]'; diff --git a/apps/token-e2e/src/integration/view/staking.cy.js b/apps/token-e2e/src/integration/view/staking.cy.js index 0f973cb5b..b53c8ea5d 100644 --- a/apps/token-e2e/src/integration/view/staking.cy.js +++ b/apps/token-e2e/src/integration/view/staking.cy.js @@ -50,79 +50,50 @@ context('Staking Page - verify elements on page', function () { function () { // 2001-STKE-050 it('Should be able to see validator names', function () { - cy.get('[col-id="validator"]') + cy.get('[col-id="validator"] > div > span') .should('have.length.at.least', 1) .each(($name) => { cy.wrap($name).should('not.be.empty'); }); }); - it('Should be able to see validator status', function () { - cy.get('[col-id="status"]') + it('Should be able to see validator stake', function () { + cy.get('[col-id="stake"] > div > span') .should('have.length.at.least', 1) - .each(($status) => { - cy.wrap($status).should('not.be.empty'); + .each(($stake) => { + cy.wrap($stake).should('not.be.empty'); }); }); - it('Should be able to see total stake for this epoch', function () { - cy.get('[col-id="totalStakeThisEpoch"]') + it('Should be able to see validator normalised voting power', function () { + cy.get('[col-id="normalisedVotingPower"] > div > span') .should('have.length.at.least', 1) - .each(($totalStaked) => { - cy.wrap($totalStaked).should('not.be.empty'); + .each(($vPower) => { + cy.wrap($vPower).should('not.be.empty'); }); }); - it('Should be able to see validator staked for this epoch', function () { - cy.get('[col-id="validatorStake"]') + it('Should be able to see validator normalised voting power', function () { + cy.get('[col-id="normalisedVotingPower"] > div > span') .should('have.length.at.least', 1) - .each(($validatorStake) => { - cy.wrap($validatorStake).should('not.be.empty'); + .each(($vPower) => { + cy.wrap($vPower).should('not.be.empty'); }); }); - it('Should be able to see validator staked for next epoch', function () { - cy.get('[col-id="pendingStake"]') + it('Should be able to see validator total penalties', function () { + cy.get('[col-id="totalPenalties"] > div > span') + .should('have.length.at.least', 1) + .each(($penalties) => { + cy.wrap($penalties).should('contain.text', '0%'); + }); + }); + + it('Should be able to see validator pending stake', function () { + cy.get('[col-id="pendingStake"] > div > span') .should('have.length.at.least', 1) .each(($pendingStake) => { - cy.wrap($pendingStake).should('not.be.empty'); - }); - }); - - // 2001-STKE-021 - it('Should be able to see validator ranking score', function () { - cy.get('.ag-body-horizontal-scroll-viewport').scrollTo('right'); - cy.get('[col-id="rankingScore"]') - .should('have.length.at.least', 1) - .each(($rankingScore) => { - cy.wrap($rankingScore).should('not.be.empty'); - }); - }); - - // 2001-STKE-022 - it('Should be able to see validator stake score', function () { - cy.get('[col-id="stakeScore"]') - .should('have.length.at.least', 1) - .each(($stakeScore) => { - cy.wrap($stakeScore).should('not.be.empty'); - }); - }); - - // 2001-STKE-023 - it('Should be able to see validator performance score', function () { - cy.get('[col-id="performanceScore"]') - .should('have.length.at.least', 1) - .each(($performanceScore) => { - cy.wrap($performanceScore).should('not.be.empty'); - }); - }); - - // 2001-STKE-024 - it('Should be able to see validator voting power score', function () { - cy.get('[col-id="votingPower"]') - .should('have.length.at.least', 1) - .each(($votingPower) => { - cy.wrap($votingPower).should('not.be.empty'); + cy.wrap($pendingStake).should('contain.text', '0.00'); }); }); diff --git a/apps/token-e2e/src/support/staking.functions.js b/apps/token-e2e/src/support/staking.functions.js index 8a35364e5..9f4cee6db 100644 --- a/apps/token-e2e/src/support/staking.functions.js +++ b/apps/token-e2e/src/support/staking.functions.js @@ -12,8 +12,8 @@ const associateWalletRadioButton = '[data-testid="associate-radio-wallet"]'; const associateContractRadioButton = '[data-testid="associate-radio-contract"]'; const stakeMaximumTokens = '[data-testid="token-amount-use-maximum"]'; const stakeValidatorListPendingStake = '[col-id="pendingStake"]'; -const stakeValidatorListTotalStake = '[col-id="totalStakeThisEpoch"]'; -const stakeValidatorListTotalShare = '[col-id="share"]'; +const stakeValidatorListTotalStake = '[col-id="stake"] > div > span'; +const stakeValidatorListTotalShare = '[col-id="stakeShare"] > div > span'; const stakeValidatorListName = '[col-id="validator"]'; const vegaKeySelector = '#vega-key-selector'; @@ -150,7 +150,6 @@ Cypress.Commands.add( (validatorNumber, validatorName = null) => { cy.wait_for_spinner(); cy.contains('Loading...', epochTimeout).should('not.exist'); - cy.contains('Total stake this epoch').should('be.visible'); cy.wait_for_beginning_of_epoch(); // below is to ensure validator list is shown cy.get(stakeValidatorListName, { timeout: 10000 }).should('exist'); @@ -179,10 +178,8 @@ Cypress.Commands.add( ) => { cy.wait_for_spinner(); cy.contains('Loading...', epochTimeout).should('not.exist'); - cy.contains('Total stake this epoch').should('be.visible'); cy.wait_for_beginning_of_epoch(); cy.get(`[row-id="${positionOnList}"]`).within(() => { - cy.get(stakeValidatorListName).should('have.text', expectedValidatorName); cy.get(stakeValidatorListTotalStake, epochTimeout).should( 'have.text', expectedTotalStake