Playwright E2E: stamp running test name into window title#23
Merged
Conversation
beforeEach sets the main window's OS title to `<base> (Running: <test>)` and afterEach appends `(FINISHED)`, so the dock / Cmd-Tab / Linux title bar tells you which spec is in flight without tailing the log. Base title is captured once per worker so suffixes don't accumulate across tests. Uses the standard `plugin:window|set_title` Tauri command; permissions are added only to the feature-gated `playwright.json` capability that `build.rs` generates when `playwright-e2e` is on, so release builds are unaffected.
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.
Adds
beforeEach/afterEachhooks toapps/desktop/test/e2e-playwright/fixtures.tsthat update the main Tauri window's OS title with the currently running test name, so you can see which spec is in flight (or stuck) by glancing at the dock / Cmd-Tab / Linux title bar — no log tailing needed.beforeEach: sets title to<base> (Running: Section › test name)afterEach: appends(FINISHED)testInfo.titlePath, joining describe block(s) + test title with›plugin:window|set_title(and|titlefor the initial read), no new Rust commandcore:window:allow-title,core:window:allow-set-title) are added to the auto-generatedplaywright.jsoncapability thatbuild.rsonly emits when theplaywright-e2eCargo feature is on, so release builds are unaffectedapps/desktop/test/e2e-playwright/CLAUDE.mddocuments the new behaviorTest plan
cargo check --features playwright-e2eclean; verified the regeneratedplaywright.jsonincludes the two new permissionstsc --project test/e2e-playwright/tsconfig.jsoncleaneslint test/e2e-playwright/fixtures.tsclean./scripts/check.sh --check desktop-e2e-playwrightrun; if theset_titleinvoke ever rejects (e.g., permissions slip out of sync) the hooks swallow the error so tests still pass — failure mode is just "title doesn't update," not a flaky test