test: remove eth wallet test (#989)
This commit is contained in:
parent
22fc0e7ac1
commit
1c4231f6fc
@ -2,6 +2,8 @@ import { aliasQuery } from '@vegaprotocol/cypress';
|
||||
import { generateDepositPage } from '../support/mocks/generate-deposit-page';
|
||||
import { generateNetworkParameters } from '../support/mocks/generate-network-parameters';
|
||||
|
||||
const connectEthWalletBtn = 'connect-eth-wallet-btn';
|
||||
|
||||
describe('deposit form validation', () => {
|
||||
beforeEach(() => {
|
||||
cy.mockWeb3Provider();
|
||||
@ -12,7 +14,7 @@ describe('deposit form validation', () => {
|
||||
cy.visit('/portfolio/deposit');
|
||||
|
||||
// Deposit page requires connection Ethereum wallet first
|
||||
cy.getByTestId('connect-eth-wallet-btn').click();
|
||||
cy.getByTestId(connectEthWalletBtn).click();
|
||||
cy.getByTestId('web3-connector-MetaMask').click();
|
||||
|
||||
cy.wait('@DepositPage');
|
||||
@ -55,4 +57,19 @@ describe('deposit form validation', () => {
|
||||
.next(`[data-testid="${formFieldError}"]`)
|
||||
.should('have.text', 'Insufficient amount in Ethereum wallet');
|
||||
});
|
||||
|
||||
it('able to disconnect eth wallet', () => {
|
||||
const ethWalletAddress = Cypress.env('ETHEREUM_WALLET_ADDRESS');
|
||||
|
||||
cy.get('#ethereum-address').should('have.value', ethWalletAddress).click();
|
||||
cy.getByTestId('dialog-content').within(() => {
|
||||
cy.get('p').should('have.text', `Connected with ${ethWalletAddress}`);
|
||||
cy.get('button')
|
||||
.should('have.text', 'Disconnect Ethereum Wallet')
|
||||
.click();
|
||||
});
|
||||
|
||||
cy.getByTestId('connect-eth-wallet-msg').should('exist');
|
||||
cy.getByTestId(connectEthWalletBtn).should('exist');
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user