test: deposit flow from collateral window e2e tests

This commit is contained in:
Dariusz Majcherczyk
2023-02-22 10:59:29 +01:00
parent 8e82bf43fb
commit 115bc67260
2 changed files with 24 additions and 0 deletions
@@ -66,3 +66,25 @@ describe('deposit form validation', { tags: '@smoke' }, () => {
.should('have.text', 'Insufficient amount in Ethereum wallet');
});
});
describe('deposit actions', { tags: '@smoke' }, () => {
before(() => {
cy.clearLocalStorage();
cy.mockWeb3Provider();
cy.mockTradingPage();
cy.mockSubscription();
cy.setVegaWallet();
cy.visit('/');
cy.getByTestId('dialog-close').click();
});
it('Deposit to trade is visble', () => {
cy.getByTestId('Collateral').click();
cy.contains('[data-testid="deposit"]', 'Deposit to trade').should(
'be.visible'
);
cy.contains('[data-testid="deposit"]', 'Deposit to trade').click();
connectEthereumWallet('MetaMask');
cy.getByTestId('deposit-submit').should('be.visible');
});
});
@@ -1,11 +1,13 @@
import { mockConnectWallet } from '@vegaprotocol/cypress';
beforeEach(() => {
cy.clearLocalStorage();
cy.mockTradingPage();
cy.mockSubscription();
cy.visit('/');
cy.wait('@Markets');
cy.wait('@MarketsData');
cy.wait('@MarketsCandles');
cy.getByTestId('dialog-close').click();
});