* test: adding extra checks within tests * test: lint * test: refactor to bring assertions inline with new wallet locators * test: lint * test: lint correction * test: formatting for lint * test: formatting for lint * test: fix test and make use of common functions * test: lint
19 lines
804 B
JavaScript
19 lines
804 B
JavaScript
const ethWalletContainer = '[data-testid="ethereum-wallet"]';
|
|
const connectToEthButton = '[data-testid="connect-to-eth-wallet-button"]';
|
|
const capsuleWalletConnectButton = '[data-testid="web3-connector-Unknown"]';
|
|
|
|
Cypress.Commands.add('ethereum_wallet_connect', () => {
|
|
cy.highlight('Connecting Eth Wallet');
|
|
cy.get(connectToEthButton).within(() => {
|
|
cy.contains('Connect Ethereum wallet to associate $VEGA')
|
|
.should('be.visible')
|
|
.click();
|
|
});
|
|
cy.get(capsuleWalletConnectButton).click();
|
|
cy.get(capsuleWalletConnectButton, { timeout: 60000 }).should('not.exist');
|
|
cy.get(ethWalletContainer).within(() => {
|
|
// this check is required since it ensures the wallet is fully (not partially) loaded
|
|
cy.contains('Locked', { timeout: 15000 }).should('be.visible');
|
|
});
|
|
});
|