mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-21 15:36:50 -05:00
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:
@@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user