test: lint

This commit is contained in:
AndyWhiteVega 2022-07-04 09:14:25 +01:00
parent bcd37e21ae
commit a4143a2f65
3 changed files with 16 additions and 21 deletions

View File

@ -22,5 +22,5 @@ export default {
stakeAssociateWalletRadio: '[data-testid="associate-radio-wallet"]',
disassociateButton: '[data-testid="disassociate-tokens-btn"]',
associateMoreTokensButton: '[data-testid="associate-more-tokens-btn"]',
associateButton: '[data-testid="associate-tokens-btn"]'
associateButton: '[data-testid="associate-tokens-btn"]',
};

View File

@ -8,10 +8,9 @@ Cypress.Commands.add(
cy.log(
`👉 **_Checking Staking Page - Validator Stake Next Epoch Value is ${expectedVal}_**`
);
cy.get(staking.stakeNextEpochValue, { timeout: 10000 }).contains(
expectedVal,
{ timeout: 10000 }
).should('be.visible');
cy.get(staking.stakeNextEpochValue, { timeout: 10000 })
.contains(expectedVal, { timeout: 10000 })
.should('be.visible');
}
);
@ -23,19 +22,16 @@ Cypress.Commands.add(
cy.log(
`👉 **_Checking Staking Page - Validator Stake This Epoch Value is ${expectedVal}_**`
);
cy.get(staking.stakeThisEpochValue, { timeout: 10000 }).contains(
expectedVal,
{ timeout: 10000 }
).should('be.visible');
cy.get(staking.stakeThisEpochValue, { timeout: 10000 })
.contains(expectedVal, { timeout: 10000 })
.should('be.visible');
}
);
// ----------------------------------------------------------------------
Cypress.Commands.add('staking_validator_page_add_stake', function (stake) {
cy.log(
`👉 **_Adding a stake of ${stake}_**`
);
cy.log(`👉 **_Adding a stake of ${stake}_**`);
cy.get(staking.addStakeRadioButton).click({ force: true });
cy.get(staking.tokenAmountInput).type(stake);
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) {
cy.log(
`👉 **_Removing a stake of ${stake}_**`
);
cy.log(`👉 **_Removing a stake of ${stake}_**`);
cy.get(staking.removeStakeRadioButton).click({ force: true });
cy.get(staking.tokenAmountInput).type(stake);
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(

View File

@ -25,9 +25,9 @@ const getAccount = (number = 0) => `m/44'/60'/0'/0/${number}`;
// ----------------------------------------------------------------------
Cypress.Commands.add('vega_wallet_teardown', function () {
cy.wrap(
Wallet.fromMnemonic(vegaWalletMnemonic, getAccount(0)).privateKey, {log: false}
).then((privateKey) => {
cy.wrap(Wallet.fromMnemonic(vegaWalletMnemonic, getAccount(0)).privateKey, {
log: false,
}).then((privateKey) => {
cy.vega_wallet_teardown_staking(privateKey);
cy.vega_wallet_teardown_vesting(privateKey);
cy.vega_wallet_check_associated_value_is('0.000000000000000000');
@ -243,7 +243,9 @@ Cypress.Commands.add(
Cypress.Commands.add(
'vega_wallet_check_associated_value_is',
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.contains('Associated', { timeout: 40000 })
.parent()