test(e2e): match docStore update in navigation blocker save test - #31065
Closed
ShaileshParmar11 wants to merge 1 commit into
Closed
test(e2e): match docStore update in navigation blocker save test#31065ShaileshParmar11 wants to merge 1 commit into
ShaileshParmar11 wants to merge 1 commit into
Conversation
`Navigation Blocker Tests > should not show navigation blocker after
saving changes` is flaky in 9 of the last 9 Main V2 nightly runs (16/16 on
2.0, 20/34 on 1.13), failing the first attempt on a 60s timeout and
passing on retry.
The tests in this file share one persona, and run sequentially
(describe.configure mode: 'default'). An earlier test — "should confirm
navigation when Save changes is clicked" — already saves a layout for that
persona, so by the time this test saves, the request is an UPDATE
(PUT /api/v1/docStore/{id}) rather than a create.
The wait was `waitForResponse('/api/v1/docStore')`. A bare string is an
exact URL match, so it never matches the update and the await hangs until
the test timeout. This was the only exact docStore matcher left in the
suite; every other one uses a wildcard. Note '*' does not cross a '/', so
the sibling's 'api/v1/docStore*' works only because its own save is a
create — matching the update needs '**'.
On retry Playwright starts a fresh worker, beforeAll creates a new persona,
and the save becomes a create again — which is why the test always passes
on the second attempt and never on the first.
Also relaxes the toast assertion to accept "created" or "updated": this
test covers navigation-blocker behaviour, not create-vs-update semantics,
and should not depend on whether a preceding test already created the
layout.
Reproduced deterministically before the fix by running the file in order —
test 4 fails at 1.0m with `waiting for response "/api/v1/docStore"`. After
the fix the same run is 5/5 green and the test completes in 4.3s.
Verified with --repeat-each=20, 20/20 passed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Code Review ✅ ApprovedUpdates the docStore matcher in the navigation blocker e2e test to handle update requests alongside creates, resolving the 60-second test timeout. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source |
Contributor
Author
|
Superseded by #31063, which is now the rolling Keeping a single accumulating PR for |
ShaileshParmar11
deleted the
fix/navigation-blocker-docstore-matcher-main
branch
August 5, 2026 18:19
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.
Problem
Navigation Blocker Tests › should not show navigation blocker after saving changesis flaky in:main2.01.13It fails the first attempt on a 60s timeout and passes on retry.
Root cause
The tests in this file share one persona and run sequentially (
describe.configure({ mode: 'default' })). An earlier test — "should confirm navigation when Save changes is clicked" — already saves a layout for that persona. So by the time this test saves, the request is an UPDATE (PUT /api/v1/docStore/{id}), not a create.The wait was
waitForResponse('/api/v1/docStore'). A bare string is an exact URL match, so it never matches the update and the await hangs until the test timeout. This was the only exactdocStorematcher left in the suite.*does not cross a/in Playwright globs, so the sibling's'api/v1/docStore*'works only because its own save is a create. Matching the update requires**.On retry, a fresh worker means
beforeAllcreates a new persona and the save is a create again — which is why it always passes on attempt 2 and never on attempt 1.Evidence from the failed attempt: the Save button is already
[disabled]in the error-context snapshot, i.e. the save had completed — only the matcher missed it.Fix
**/api/v1/docStore**, covering both create and update.createdorupdated, since this test covers navigation-blocker behaviour rather than create-vs-update semantics.Verification
This one reproduces deterministically by running the file in order.
--repeat-each=20on the target testIterations 2+ of the repeat run exercise the update path that was previously unmatched.
🤖 Generated with Claude Code