Skip to content
Snippets Groups Projects
Unverified Commit 4485a631 authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

Revert "CSV import e2e tests (#3467)" (#3474)

This reverts commit 5e12d401.
parent 25a40419
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 62 deletions
import { join } from 'path';
import { test, expect } from '@playwright/test';
import { ConfigurationPage } from './page-models/configuration-page';
......@@ -101,44 +99,4 @@ test.describe('Accounts', () => {
await expect(transaction.account).toHaveText('Ally Savings');
});
});
test.describe('Import Transactions', () => {
test.beforeEach(async () => {
accountPage = await navigation.createAccount({
name: 'CSV import',
offBudget: false,
balance: 0,
});
});
test.afterEach(async () => {
const close = await accountPage.clickCloseAccount();
await close.selectTransferAccount('Vanguard 401k');
await close.forceCloseAccount();
});
async function importCsv(screenshot = false) {
const fileChooserPromise = page.waitForEvent('filechooser');
await accountPage.page.getByRole('button', { name: 'Import' }).click();
const fileChooser = await fileChooserPromise;
await fileChooser.setFiles(join(__dirname, 'data/test.csv'));
if (screenshot) await expect(page).toMatchThemeScreenshots();
await accountPage.page
.getByRole('button', { name: /Import \d+ transactions/ })
.click();
}
test('imports transactions from a CSV file', async () => {
await importCsv(true);
});
test('import csv file twice', async () => {
await importCsv(false);
await page.waitForTimeout(1000);
await importCsv(true);
});
});
});
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
Date,Payee,Notes,Category,Amount
2024-08-02,Deposit,test 1,Income,1787.76
2024-07-02,Deposit,test 2,Income,1787.76
2024-06-02,Deposit,test 3,Income,1787.76
2024-05-02,Deposit,test 4,Income,1787.76
2024-04-02,Deposit,test 5,Income,1787.76
2024-03-02,Deposit,test 6,Income,1787.76
2024-02-02,Deposit,test 7,Income,1787.76
2024-01-02,Starting Balance,test 8,Starting Balances,-330000
......@@ -12,8 +12,4 @@ export class CloseAccountModal {
async closeAccount() {
await this.page.getByRole('button', { name: 'Close account' }).click();
}
async forceCloseAccount() {
await this.page.getByLabel('Force close').click();
}
}
......@@ -230,7 +230,6 @@ export function CloseAccountModal({
close();
}}
style={{ color: theme.errorText }}
aria-label="Force close"
>
force close
</Link>{' '}
......
---
category: Maintenance
authors: [UnderKoen]
---
E2E tests for CSV import dialog
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment