test: lint
This commit is contained in:
parent
bcd37e21ae
commit
a4143a2f65
@ -22,5 +22,5 @@ export default {
|
|||||||
stakeAssociateWalletRadio: '[data-testid="associate-radio-wallet"]',
|
stakeAssociateWalletRadio: '[data-testid="associate-radio-wallet"]',
|
||||||
disassociateButton: '[data-testid="disassociate-tokens-btn"]',
|
disassociateButton: '[data-testid="disassociate-tokens-btn"]',
|
||||||
associateMoreTokensButton: '[data-testid="associate-more-tokens-btn"]',
|
associateMoreTokensButton: '[data-testid="associate-more-tokens-btn"]',
|
||||||
associateButton: '[data-testid="associate-tokens-btn"]'
|
associateButton: '[data-testid="associate-tokens-btn"]',
|
||||||
};
|
};
|
||||||
|
@ -8,10 +8,9 @@ Cypress.Commands.add(
|
|||||||
cy.log(
|
cy.log(
|
||||||
`👉 **_Checking Staking Page - Validator Stake Next Epoch Value is ${expectedVal}_**`
|
`👉 **_Checking Staking Page - Validator Stake Next Epoch Value is ${expectedVal}_**`
|
||||||
);
|
);
|
||||||
cy.get(staking.stakeNextEpochValue, { timeout: 10000 }).contains(
|
cy.get(staking.stakeNextEpochValue, { timeout: 10000 })
|
||||||
expectedVal,
|
.contains(expectedVal, { timeout: 10000 })
|
||||||
{ timeout: 10000 }
|
.should('be.visible');
|
||||||
).should('be.visible');
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -23,19 +22,16 @@ Cypress.Commands.add(
|
|||||||
cy.log(
|
cy.log(
|
||||||
`👉 **_Checking Staking Page - Validator Stake This Epoch Value is ${expectedVal}_**`
|
`👉 **_Checking Staking Page - Validator Stake This Epoch Value is ${expectedVal}_**`
|
||||||
);
|
);
|
||||||
cy.get(staking.stakeThisEpochValue, { timeout: 10000 }).contains(
|
cy.get(staking.stakeThisEpochValue, { timeout: 10000 })
|
||||||
expectedVal,
|
.contains(expectedVal, { timeout: 10000 })
|
||||||
{ timeout: 10000 }
|
.should('be.visible');
|
||||||
).should('be.visible');
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
Cypress.Commands.add('staking_validator_page_add_stake', function (stake) {
|
Cypress.Commands.add('staking_validator_page_add_stake', function (stake) {
|
||||||
cy.log(
|
cy.log(`👉 **_Adding a stake of ${stake}_**`);
|
||||||
`👉 **_Adding a stake of ${stake}_**`
|
|
||||||
);
|
|
||||||
cy.get(staking.addStakeRadioButton).click({ force: true });
|
cy.get(staking.addStakeRadioButton).click({ force: true });
|
||||||
cy.get(staking.tokenAmountInput).type(stake);
|
cy.get(staking.tokenAmountInput).type(stake);
|
||||||
cy.contains('Waiting for next epoch to start', { timeout: 10000 });
|
cy.contains('Waiting for next epoch to start', { timeout: 10000 });
|
||||||
@ -53,9 +49,7 @@ Cypress.Commands.add('staking_validator_page_add_stake', function (stake) {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
Cypress.Commands.add('staking_validator_page_removeStake', function (stake) {
|
Cypress.Commands.add('staking_validator_page_removeStake', function (stake) {
|
||||||
cy.log(
|
cy.log(`👉 **_Removing a stake of ${stake}_**`);
|
||||||
`👉 **_Removing a stake of ${stake}_**`
|
|
||||||
);
|
|
||||||
cy.get(staking.removeStakeRadioButton).click({ force: true });
|
cy.get(staking.removeStakeRadioButton).click({ force: true });
|
||||||
cy.get(staking.tokenAmountInput).type(stake);
|
cy.get(staking.tokenAmountInput).type(stake);
|
||||||
cy.contains('Waiting for next epoch to start', { timeout: 10000 });
|
cy.contains('Waiting for next epoch to start', { timeout: 10000 });
|
||||||
@ -69,7 +63,6 @@ Cypress.Commands.add('staking_validator_page_removeStake', function (stake) {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
Cypress.Commands.add(
|
Cypress.Commands.add(
|
||||||
@ -117,4 +110,4 @@ Cypress.Commands.add('staking_page_disassociate_tokens', function (amount) {
|
|||||||
}).should('be.visible');
|
}).should('be.visible');
|
||||||
});
|
});
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
@ -25,9 +25,9 @@ const getAccount = (number = 0) => `m/44'/60'/0'/0/${number}`;
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
Cypress.Commands.add('vega_wallet_teardown', function () {
|
Cypress.Commands.add('vega_wallet_teardown', function () {
|
||||||
cy.wrap(
|
cy.wrap(Wallet.fromMnemonic(vegaWalletMnemonic, getAccount(0)).privateKey, {
|
||||||
Wallet.fromMnemonic(vegaWalletMnemonic, getAccount(0)).privateKey, {log: false}
|
log: false,
|
||||||
).then((privateKey) => {
|
}).then((privateKey) => {
|
||||||
cy.vega_wallet_teardown_staking(privateKey);
|
cy.vega_wallet_teardown_staking(privateKey);
|
||||||
cy.vega_wallet_teardown_vesting(privateKey);
|
cy.vega_wallet_teardown_vesting(privateKey);
|
||||||
cy.vega_wallet_check_associated_value_is('0.000000000000000000');
|
cy.vega_wallet_check_associated_value_is('0.000000000000000000');
|
||||||
@ -243,7 +243,9 @@ Cypress.Commands.add(
|
|||||||
Cypress.Commands.add(
|
Cypress.Commands.add(
|
||||||
'vega_wallet_check_associated_value_is',
|
'vega_wallet_check_associated_value_is',
|
||||||
function (expectedVal) {
|
function (expectedVal) {
|
||||||
cy.log(`👉 **_Checking vega wallet - Associated Value is ${expectedVal}_**`);
|
cy.log(
|
||||||
|
`👉 **_Checking vega wallet - Associated Value is ${expectedVal}_**`
|
||||||
|
);
|
||||||
cy.get(wallet.vegawallet).within(() => {
|
cy.get(wallet.vegawallet).within(() => {
|
||||||
cy.contains('Associated', { timeout: 40000 })
|
cy.contains('Associated', { timeout: 40000 })
|
||||||
.parent()
|
.parent()
|
||||||
|
Loading…
Reference in New Issue
Block a user