test: lint

This commit is contained in:
AndyWhiteVega 2022-07-01 12:14:35 +01:00
parent 63f219944d
commit aa8bae9b45
3 changed files with 32 additions and 22 deletions

View File

@ -17,15 +17,17 @@ module.exports = defineConfig({
env: {
eth_provider_url: 'http://localhost:8545/',
eth_wallet_public_key: '0xEe7D375bcB50C26d52E1A4a472D8822A2A22d94F',
eth_staking_bridge_contract_address: '0x9135f5afd6F055e731bca2348429482eE614CFfA',
vega_wallet_name : 'capsule_wallet',
vega_wallet_location : '~/.vegacapsule/testnet/wallet',
vega_wallet_passphrase : '123',
vega_wallet_mnemonic: 'ozone access unlock valid olympic save include omit supply green clown session',
vega_wallet_public_key:'02eceaba4df2bef76ea10caf728d8a099a2aa846cced25737cccaa9812342f65',
vega_wallet_public_key_short:'02ecea…2f65',
vega_token_contract_address:'0xF41bD86d462D36b997C0bbb4D97a0a3382f205B7',
vega_token_address:'0x67175Da1D5e966e40D11c4B2519392B2058373de'
}
eth_staking_bridge_contract_address:
'0x9135f5afd6F055e731bca2348429482eE614CFfA',
vega_wallet_name: 'capsule_wallet',
vega_wallet_location: '~/.vegacapsule/testnet/wallet',
vega_wallet_passphrase: '123',
vega_wallet_mnemonic:
'ozone access unlock valid olympic save include omit supply green clown session',
vega_wallet_public_key:
'02eceaba4df2bef76ea10caf728d8a099a2aa846cced25737cccaa9812342f65',
vega_wallet_public_key_short: '02ecea…2f65',
vega_token_contract_address: '0xF41bD86d462D36b997C0bbb4D97a0a3382f205B7',
vega_token_address: '0x67175Da1D5e966e40D11c4B2519392B2058373de',
},
});

View File

@ -6,7 +6,8 @@ Cypress.Commands.add(
'staking_validator_page_check_stake_next_epoch_value',
function (expectedVal) {
cy.get(staking.stakeNextEpochValue, { timeout: 10000 }).contains(
expectedVal, { timeout: 10000 }
expectedVal,
{ timeout: 10000 }
);
}
);

View File

@ -16,8 +16,10 @@ const vegaWalletMnemonic = Cypress.env('vega_wallet_mnemonic');
const vegaWalletPubKey = Cypress.env('vega_wallet_public_key');
const vegaTokenContractAddress = Cypress.env('vega_token_contract_address');
const vegaTokenAddress = Cypress.env('vega_token_address');
const ethWalletPubKey = Cypress.env('eth_wallet_public_key')
const ethStakingBridgeContractAddress = Cypress.env('eth_staking_bridge_contract_address')
const ethWalletPubKey = Cypress.env('eth_wallet_public_key');
const ethStakingBridgeContractAddress = Cypress.env(
'eth_staking_bridge_contract_address'
);
const ethProviderUrl = Cypress.env('eth_provider_url');
const getAccount = (number = 0) => `m/44'/60'/0'/0/${number}`;
@ -134,9 +136,11 @@ Cypress.Commands.add(
});
});
cy.log(`**_Setting token approval amount to ${resetAmount} = COMPLETE_**`);
cy.log('**_Reloading app for token approval setting to take affect_**')
cy.log('**_Reloading app for token approval setting to take affect_**');
cy.reload();
cy.log('**_Reloading app for token approval setting to take affect = COMPLETE_**')
cy.log(
'**_Reloading app for token approval setting to take affect = COMPLETE_**'
);
}
);
@ -174,7 +178,7 @@ Cypress.Commands.add('vega_wallet_import', function () {
cy.exec(
`vegawallet import -w ${vegaWalletName} --recovery-phrase-file ./src/fixtures/wallet/recovery -p ./src/fixtures/wallet/passphrase --home ~/.vegacapsule/testnet/wallet`,
{ failOnNonZeroExit: false }
)
);
cy.exec(
`vegawallet service run --network DV --automatic-consent --home ${vegaWalletLocation}`
);
@ -347,7 +351,9 @@ Cypress.Commands.add('ethereum_wallet_disassociate_all_tokens', function () {
Cypress.Commands.add(
'ethereum_wallet_check_associated_vega_key_value_is',
function (vegaShortPublicKey, expectedVal) {
cy.log(`**_Checking Eth Wallet Vega Key Associated Value is ${expectedVal} for key ${vegaShortPublicKey}_**`);
cy.log(
`**_Checking Eth Wallet Vega Key Associated Value is ${expectedVal} for key ${vegaShortPublicKey}_**`
);
cy.get(wallet.ethWallet).within(() => {
cy.contains(vegaShortPublicKey, { timeout: 20000 })
.parent()
@ -364,9 +370,10 @@ Cypress.Commands.add(
function (vegaShortPublicKey) {
cy.log(`**_Checking Eth Wallet Vega Key Associated is not showing_**`);
cy.get(wallet.ethWallet).within(() => {
cy.contains(vegaShortPublicKey, { timeout: 20000 })
.should('not.exist')
cy.contains(vegaShortPublicKey, { timeout: 20000 }).should('not.exist');
});
cy.log('**_Checking Eth Wallet Vega Key Associated is not showing = COMPLETE_**');
cy.log(
'**_Checking Eth Wallet Vega Key Associated is not showing = COMPLETE_**'
);
}
);
);