MCPcopy
hub / github.com/actualbudget/actual / importCsv

Function importCsv

packages/desktop-client/e2e/accounts.test.ts:188–206  ·  view source on GitHub ↗
(screenshot = false)

Source from the content-addressed store, hash-verified

186 });
187
188 async function importCsv(screenshot = false) {
189 const fileChooserPromise = page.waitForEvent('filechooser');
190 await accountPage.page.getByRole('button', { name: 'Import' }).click();
191
192 const fileChooser = await fileChooserPromise;
193 await fileChooser.setFiles(join(__dirname, 'data/test.csv'));
194
195 const importButton = accountPage.page.getByRole('button', {
196 name: /Import \d+ transactions/,
197 });
198
199 await importButton.waitFor({ state: 'visible' });
200
201 if (screenshot) await expect(page).toMatchThemeScreenshots();
202
203 await importButton.click();
204
205 await expect(importButton).not.toBeVisible();
206 }
207
208 test('imports transactions from a CSV file', async () => {
209 await importCsv(true);

Callers 1

accounts.test.tsFile · 0.85

Calls 4

joinFunction · 0.90
expectFunction · 0.85
waitForMethod · 0.45

Tested by

no test coverage detected