Files
actual/packages/desktop-electron/e2e/startup-errors.test.ts
Michael ClarkandGitHub 2ff97090d6 :electron: When data folder is unavailable show a friendly message (#8928)
* when data folder is unavailable due to permissions etc, show a friendly prompt

* feedback from rabbit
2026-09-15 19:43:59 +00:00

33 lines
979 B
TypeScript

import { expect } from '@playwright/test';
import { test } from './fixtures';
test.describe('Startup errors', () => {
test.use({ blockDocumentDir: true });
test('shows which folder could not be used when the data folder is blocked', async ({
electronPage,
}) => {
await expect(
electronPage.getByText('Data folder unavailable'),
).toBeVisible();
await expect(
electronPage.getByText(
"Actual couldn't access the folder where it stores your budget files:",
),
).toBeVisible();
// The failing path is `<ACTUAL_DOCUMENT_DIR>/Actual`, where
// ACTUAL_DOCUMENT_DIR points at a regular file named `blocked`.
await expect(electronPage.getByText(/blocked[\\/]Actual$/)).toBeVisible();
await expect(
electronPage.getByRole('button', { name: 'Choose a different folder' }),
).toBeVisible();
await expect(
electronPage.getByRole('button', { name: 'Restart app' }),
).toBeVisible();
});
});