From a4143a2f65ddc55f6975fdded365317814cd3dde Mon Sep 17 00:00:00 2001 From: AndyWhiteVega Date: Mon, 4 Jul 2022 09:14:25 +0100 Subject: [PATCH] test: lint --- .../src/locators/staking.locators.js | 2 +- .../src/support/staking.functions.js | 25 +++++++------------ .../token-e2e/src/support/wallet.functions.js | 10 +++++--- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/apps/token-e2e/src/locators/staking.locators.js b/apps/token-e2e/src/locators/staking.locators.js index 3a293b542..cfbbb3424 100644 --- a/apps/token-e2e/src/locators/staking.locators.js +++ b/apps/token-e2e/src/locators/staking.locators.js @@ -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"]', }; diff --git a/apps/token-e2e/src/support/staking.functions.js b/apps/token-e2e/src/support/staking.functions.js index 461f40f67..aa9eb7a47 100644 --- a/apps/token-e2e/src/support/staking.functions.js +++ b/apps/token-e2e/src/support/staking.functions.js @@ -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( @@ -117,4 +110,4 @@ Cypress.Commands.add('staking_page_disassociate_tokens', function (amount) { }).should('be.visible'); }); -// ---------------------------------------------------------------------- \ No newline at end of file +// ---------------------------------------------------------------------- diff --git a/apps/token-e2e/src/support/wallet.functions.js b/apps/token-e2e/src/support/wallet.functions.js index ba513fd7c..6d29a9784 100644 --- a/apps/token-e2e/src/support/wallet.functions.js +++ b/apps/token-e2e/src/support/wallet.functions.js @@ -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()