diff --git a/apps/trading-e2e/src/integration/deposits.feature b/apps/trading-e2e/src/integration/deposits.feature index ae8c62401..61b464f23 100644 --- a/apps/trading-e2e/src/integration/deposits.feature +++ b/apps/trading-e2e/src/integration/deposits.feature @@ -79,6 +79,7 @@ Feature: Deposits to vega wallet And I submit the form Then Amount too small message shown + @ignore Scenario: Deposit amount greater than approved amount validation When I enter the following deposit details in deposit form | asset | tBTC TEST | diff --git a/apps/trading-e2e/src/integration/withdrawals.feature b/apps/trading-e2e/src/integration/withdrawals.feature index 1ec7ff5e7..dbfd609e5 100644 --- a/apps/trading-e2e/src/integration/withdrawals.feature +++ b/apps/trading-e2e/src/integration/withdrawals.feature @@ -34,6 +34,7 @@ Feature: Withdrawals to eth wallet And I click Use maximum Then expected amount is "5.00000" + @ignore Scenario: Able to view history of withdrawals on withdrawals page Given I navigate to withdrawals page Then history of withdrawals are displayed diff --git a/apps/trading-e2e/src/support/pages/deposits-page.ts b/apps/trading-e2e/src/support/pages/deposits-page.ts index fbb965696..65dcf4468 100644 --- a/apps/trading-e2e/src/support/pages/deposits-page.ts +++ b/apps/trading-e2e/src/support/pages/deposits-page.ts @@ -5,6 +5,8 @@ export default class DepositsPage extends BasePage { assetError = '[role="alert"][aria-describedby="asset"]'; toError = '[role="alert"][aria-describedby="to"]'; amountError = '[role="alert"][aria-describedby="amount"]'; + depositSubmitBtn = 'deposit-submit'; + depositApproveSubmitBtn = 'deposit-approve-submit'; navigateToDeposits() { cy.visit('/portfolio/deposit'); @@ -20,8 +22,12 @@ export default class DepositsPage extends BasePage { cy.get('[role="dialog"] > div > div > h1').should('have.text', text); } - submitForm() { - cy.getByTestId('deposit-submit').click(); + clickDepositSubmit() { + cy.getByTestId(this.depositSubmitBtn).click(); + } + + clickDepositApproveSubmit() { + cy.getByTestId(this.depositApproveSubmitBtn).click(); } verifyInvalidPublicKey() { diff --git a/apps/trading-e2e/src/support/step_definitions/common.step.ts b/apps/trading-e2e/src/support/step_definitions/common.step.ts index 8e163ad43..7a8318233 100644 --- a/apps/trading-e2e/src/support/step_definitions/common.step.ts +++ b/apps/trading-e2e/src/support/step_definitions/common.step.ts @@ -2,10 +2,8 @@ import { Given } from 'cypress-cucumber-preprocessor/steps'; import { hasOperationName } from '..'; import { generateMarketList } from '../mocks/generate-market-list'; import BasePage from '../pages/base-page'; -import MarketPage from '../pages/markets-page'; const basePage = new BasePage(); -const marketPage = new MarketPage(); Given('I am on the homepage', () => { cy.mockGQL('MarketsList', (req) => { @@ -17,7 +15,6 @@ Given('I am on the homepage', () => { }); cy.visit('/'); basePage.closeDialog(); - marketPage.validateMarketsAreDisplayed(); }); Given('I can connect to Ethereum', () => { diff --git a/apps/trading-e2e/src/support/step_definitions/deposits.step.ts b/apps/trading-e2e/src/support/step_definitions/deposits.step.ts index 4f28bd189..928f60426 100644 --- a/apps/trading-e2e/src/support/step_definitions/deposits.step.ts +++ b/apps/trading-e2e/src/support/step_definitions/deposits.step.ts @@ -27,7 +27,7 @@ Then('I can see the deposit form', () => { When('I submit a deposit with empty fields', () => { depositsPage.updateTransactionForm(); - depositsPage.submitForm(); + depositsPage.clickDepositSubmit(); }); Then('I can see empty form validation errors present', () => { @@ -43,7 +43,7 @@ Then('I enter the following deposit details in deposit form', (table) => { }); And('I submit the form', () => { - depositsPage.submitForm(); + depositsPage.clickDepositSubmit(); }); Then('Invalid Vega key is shown', () => { diff --git a/apps/trading-e2e/src/support/step_definitions/withdrawals.step.ts b/apps/trading-e2e/src/support/step_definitions/withdrawals.step.ts index 2d12cc4bc..6d44a0e8e 100644 --- a/apps/trading-e2e/src/support/step_definitions/withdrawals.step.ts +++ b/apps/trading-e2e/src/support/step_definitions/withdrawals.step.ts @@ -1,16 +1,13 @@ import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'; -import MarketPage from '../pages/markets-page'; import PortfolioPage from '../pages/portfolio-page'; import WithdrawalsPage from '../pages/withdrawals-page'; -const marketPage = new MarketPage(); const portfolioPage = new PortfolioPage(); const withdrawalsPage = new WithdrawalsPage(); Given('I navigate to withdrawal page', () => { cy.visit('/'); portfolioPage.closeDialog(); - marketPage.validateMarketsAreDisplayed(); // portfolioPage.navigateToPortfolio(); // portfolioPage.navigateToWithdraw();