From c5a4374cf2a0051396950ab6f00ff07bc7cda8db Mon Sep 17 00:00:00 2001 From: Karan Handa Date: Fri, 19 Jan 2024 14:25:34 +0530 Subject: [PATCH] remove plaid tests from account.cy.ts --- apps/e2e/src/e2e/accounts.cy.ts | 75 --------------------------------- 1 file changed, 75 deletions(-) diff --git a/apps/e2e/src/e2e/accounts.cy.ts b/apps/e2e/src/e2e/accounts.cy.ts index 6eba3db1..dbe2360f 100644 --- a/apps/e2e/src/e2e/accounts.cy.ts +++ b/apps/e2e/src/e2e/accounts.cy.ts @@ -19,81 +19,6 @@ function openEditAccountModal() { } describe('Accounts', () => { - it('should sync and edit a plaid connection', () => { - cy.apiRequest({ - method: 'POST', - url: 'e2e/plaid/connect', - }).then((response) => { - expect(response.status).to.eql(200) - - // The only time we need to manually send a Plaid webhook is in Github actions when testing a PR - if (Cypress.env('WEBHOOK_TYPE') === 'mock') { - const { plaidItemId } = response.body.data.json - - cy.request({ - method: 'POST', - url: `${Cypress.env('API_URL')}/plaid/webhook`, - body: { - webhook_type: 'TRANSACTIONS', - webhook_code: 'HISTORICAL_UPDATE', - item_id: plaidItemId, - }, - }) - .its('status') - .should('equal', 200) - } - }) - - // Check account sidebar names and balances - cy.visit('/accounts') - cy.getByTestId('account-group', { timeout: 20_000 }) - - assertSidebarAccounts([ - ['Assets', '$20,000'], - ['Cash', '$20,000'], - ['Sandbox Savings', '$15,000'], - ['Sandbox Checking', '$5,000'], - ['Debts', '$950'], - ['Credit Cards', '$950'], - ['Sandbox CC', '$950'], - ]) - - // Check current net worth - cy.visit('/') - cy.getByTestId('current-data-value').should('contain.text', '$19,050.00') - - // Visit each account page, edit details, re-validate amounts - cy.contains('a', 'Sandbox Checking').click() - cy.getByTestId('current-data-value').should('contain.text', '$5,000.00') - - cy.contains('a', 'Sandbox Savings').click() - cy.getByTestId('current-data-value').should('contain.text', '$15,000.00') - - cy.contains('a', 'Sandbox CC').click() - cy.getByTestId('current-data-value').should('contain.text', '$950.00') - - openEditAccountModal() - - cy.getByTestId('connected-account-form').within(() => { - cy.get('input[name="name"]') - .should('have.value', 'Sandbox CC') - .clear() - .type('Credit Credit') - cy.get('input[name="categoryUser"]').should('have.value', 'credit') - cy.get('input[name="startDate"]') - .should('have.value', '') - .type(DateTime.now().minus({ months: 1 }).toFormat('MMddyyyy')) - cy.root().submit() - }) - - // Should be able to submit empty start date on connected account - openEditAccountModal() - cy.getByTestId('connected-account-form').within(() => { - cy.get('input[name="startDate"]').clear() - cy.root().submit() - }) - }) - it('should interpolate and display manual vehicle account data', () => { cy.getByTestId('add-account-button').click() cy.contains('h4', 'Add account')