Add option to control note imports during transaction import (#4593)

* Make note imports optional. Adds tests too

* add release notes

* Update VRT

* type getTransactions to resolve TS error

* remove CSV note import - already supported

* type and lint to make coderabbit happy

* conditional rendering of importNotes

* Update VRT

* update snapshot to account for serialization change

* use <Trans>

Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>

* Fix closing Trans

Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>

* address missing import

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>
Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>
This commit is contained in:
Ian
2025-04-09 18:29:34 -04:00
committed by GitHub
parent 01f45d5072
commit 608b4be765
13 changed files with 472 additions and 16 deletions

View File

@@ -161,5 +161,28 @@ test.describe('Accounts', () => {
await expect(importButton).not.toBeVisible();
});
test('import notes checkbox is not shown for CSV files', async () => {
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'));
// Verify the import notes checkbox is not visible for CSV files
const importNotesCheckbox = page.getByRole('checkbox', {
name: 'Import notes from file',
});
await expect(importNotesCheckbox).not.toBeVisible();
// Import the transactions
const importButton = page.getByRole('button', {
name: /Import \d+ transactions/,
});
await importButton.click();
// Verify the transactions were imported
await expect(importButton).not.toBeVisible();
});
});
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 KiB

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB