test: assert durable state instead of self-dismissing toasts in desktop E2E - #187
Merged
Conversation
Base UI toasts dismiss after 5s, so a slow run loses the affordance before the assertion resolves. The on-disk contents, the Save menu item state, and the frontend's operationFailed diagnostic already prove the same crossings of the native boundary and outlive the operation. missing-document-error no longer covers the rendered error text; the errorKind-to-message mapping is unit-tested in documentErrors.test.ts.
Base UI dismisses toasts after 5s, and a slow run loses the affordance before the assertion resolves. The missing-file scenario reports its outcome through the toast, so the E2E build disables auto-dismissal rather than the scenario dropping that coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
document-lifecycleno longer asserts the save-success toast. The on-disk contents wait and the Save menu item returning to disabled, both already in the spec, prove the save crossed the native boundary.timeout={0}on the provider).missing-document-errorreports its outcome through the toast and has no durable user-visible substitute, so it keeps that assertion against a settled affordance instead of racing the 5s timer.docs/architecture.mdunder Verification Strategy.Toast presence is the only non-monotone condition in the suite: it becomes true, then false. WebdriverIO's polling assumes the opposite, so waiting longer makes success less likely rather than more, and a missed window fails hard after burning the full
waitforTimeout.Related Issue
Closes #185
Verification
The assembled desktop suite passes from a clean baseline, all seven scenarios.
To confirm the provider override actually takes effect rather than the assertion passing for the old reason,
missing-document-errorwas run with a temporary 8s wait inserted before the toast assertion; it passed, which the 5s default would not allow. The wait was removed before commit.Manually verified in the forced-failure path on Windows 11:
$env:LEAFDOWN_E2E_FORCE_FAILURE=1; pnpm test:e2e:desktopfailure.png,failure.json,semantic-state.json,diagnostics.json, andfixture-manifest.jsonare retained under the run's artifact directory.pnpm check:frontendpasses.Not verified: behavior on CI, which is where the original flake was measured. The suite has no CI job yet.
Notes
missing-document-erroralso gained a post-condition that no editor opened, checked after the diagnostic record confirms the operation finished.The E2E build now carries two mode-gated divergences from the shipped app: the WebDriver plugin import and this toast timeout. Both are timing or harness concerns rather than behavior. A third that changes behavior would be the signal to make notifications observable through the diagnostic channel and drop the override.
Out of scope per the issue: WebdriverIO
retries, new scenarios, and the CI job.