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>
@@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
Before Width: | Height: | Size: 171 KiB After Width: | Height: | Size: 171 KiB |
|
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 169 KiB After Width: | Height: | Size: 169 KiB |
|
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 153 KiB |
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |