diff --git a/docs/architecture.md b/docs/architecture.md index e15926f..53eeef2 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -171,6 +171,6 @@ Automated tests focus on: The Windows-local assembled desktop E2E suite complements those component and boundary tests without replacing them. It runs one embedded WebDriver worker at a time against an isolated debug binary and starts fresh application processes for independent scenarios. The suite retains the Help → Diagnostics smoke path, then adds narrow assembled-boundary assertions for the document lifecycle, real folder-watcher refresh, typed backend error propagation, persisted settings across restart, injected frame controls, and the clean window-close handshake. -User-visible acceptance paths use semantic UI interactions. Direct bridge execution is limited to corroborating diagnostic state, while Node-side filesystem, persisted-store, log, and process access provides deterministic setup or evidence around the native boundary. WebDriver plugins, permissions, and frontend integration remain limited to the dedicated desktop E2E build and are excluded from ordinary application builds. +User-visible acceptance paths use semantic UI interactions. Scenarios decide that an operation happened from state that outlives it — on-disk contents, menu item state, editor contents, or diagnostic records — rather than from an affordance that dismisses on a timer. Where the notification is itself the reported outcome, the desktop E2E build disables toast auto-dismissal so the assertion reads a settled affordance instead of racing it. Direct bridge execution is limited to corroborating diagnostic state, while Node-side filesystem, persisted-store, log, and process access provides deterministic setup or evidence around the native boundary. WebDriver plugins, permissions, and frontend integration remain limited to the dedicated desktop E2E build and are excluded from ordinary application builds. The manual [Markdown corpus](../corpus/README.md) complements automated tests for parsing, rendering, editing, serialization, folder navigation, and local resources. Keep corpus scenarios aligned with the specification when supported behavior changes; use its README for fixture taxonomy and byte-sensitive handling. diff --git a/e2e/desktop/specs/document-lifecycle.e2e.ts b/e2e/desktop/specs/document-lifecycle.e2e.ts index ddf38cc..a8ede04 100644 --- a/e2e/desktop/specs/document-lifecycle.e2e.ts +++ b/e2e/desktop/specs/document-lifecycle.e2e.ts @@ -30,9 +30,6 @@ describe("desktop document lifecycle", () => { await editor.click(); await browser.keys([Key.Ctrl, "s", Key.NULL]); - await expect($('[data-slot="toast"][data-type="success"]')).toHaveText( - expect.stringContaining("Document saved."), - ); await browser.waitUntil( async () => (await readFile(document.path, "utf8")) === document.savedMarkdown, diff --git a/e2e/desktop/specs/missing-document-error.e2e.ts b/e2e/desktop/specs/missing-document-error.e2e.ts index 0cc876f..23311a6 100644 --- a/e2e/desktop/specs/missing-document-error.e2e.ts +++ b/e2e/desktop/specs/missing-document-error.e2e.ts @@ -22,5 +22,7 @@ describe("desktop backend error propagation", () => { record.errorKind === "missingFile" && record.path === missingDocumentPath, ); + + await expect($('[contenteditable="true"]')).not.toExist(); }); }); diff --git a/src/app.tsx b/src/app.tsx index cbd0a4c..4088835 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -26,6 +26,8 @@ const DeveloperTools = import.meta.env.DEV }) : null; +const TOAST_TIMEOUT_MS = import.meta.env.MODE === "desktop-e2e" ? 0 : undefined; + const setDarkAppearance = (isDark: boolean) => { window.document.documentElement.classList.toggle("dark", isDark); }; @@ -138,7 +140,7 @@ export function App() { /> )} - + ); } diff --git a/src/lib/toast.ts b/src/lib/toast.ts index 0686f80..5f1efe4 100644 --- a/src/lib/toast.ts +++ b/src/lib/toast.ts @@ -30,6 +30,7 @@ const showToast = ( const message: MessageData = typeof messageOrTitle === "string" ? { title: messageOrTitle, description } : messageOrTitle; + // A per-toast timeout would override the provider default that holds toasts open in the E2E build. toastManager.add({ description: message.description, title: message.title,