You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(playwright): stabilize b1m acceptPlanned editing-policy round-trip
Timing-only stabilization for the b1m shard's
`dashboard-edit-multishift.spec.ts` "editing-policy stays visible and
persists when acceptPlanned is selected" test, which flaked ~50% of
post-merge stable runs (e.g. stable run 25302103911 attempt 1 — slug
`b-3e2c2-n-acceptPlanned-is-selected` — `expect(locator).toBeChecked
failed - element(s) not found`; attempt 2 passed). PR runs always
passed because PR CI happens to win the race more reliably.
Root cause (same family as FU-D / commit 07fcdcf in the b shard):
each `#firstColumn3` click fires `getAssignedSite()` *and only then*
calls `dialog.open(...)`. On slow stable-CI the `mat-dialog-container`
becomes visible before the GET commits, so the *ngIf-gated editing-
policy radios bind against a stale form snapshot. The post-save
re-open is the same race surface — the freshly-saved `acceptPlanned`
value only binds after the second GET commits, so the default 5s
`toBeChecked` retry can race the bind.
Changes (timing only — no assertion content changes):
* Wait for the `GET /assigned-sites?siteId=` response after each
`#firstColumn3` click — deterministic gate replacing the
visibility-only race window.
* Replace `personalCb.waitFor({state:'attached',timeout:10000})`
with `expect(personalCb).toBeAttached({timeout:30000})`. Same
observable contract, expect-style continuous retries with richer
flake logs.
* Bump per-assertion timeouts on the post-reopen `toBeChecked`
round-trip checks (default 5s -> 15s) so the form's reactive
bindings have room to hydrate.
* Add explicit timeouts on `waitForResponse` / `toHaveCount` /
`toBeVisible` / `toBeChecked` / `toBeAttached` calls in the same
test for consistency with FU-D.
The `b1m/` specs are mine (added in the 9-PR Phase 5 sequence); the
`b/` shard is untouched. Memory rule
`feedback_dont_edit_existing_tests.md` permits this narrow flake-fix
exception: no assertion matchers, expected values, or test intent
changed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments