Repository navigation
Repair wp/6.9 branch Actions: Fix flaky router styles stylesheet-failure e2e test - #84177
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Size Change: 0 B Total Size: 2.12 MB ℹ️ View Unchanged
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
2e1ce96 to
f7bb376
Compare
f7bb376 to
b7f3daf
Compare
b7f3daf to
2e264d8
Compare
2e264d8 to
76d663f
Compare
76d663f to
8a5afec
Compare
tellthemachines
left a comment
There was a problem hiding this comment.
LGTM! Changeset is same as #72783 and test is passing.
8a5afec to
d66e524
Compare
Part of #82785.
What?
Backports #72783 to
wp/6.9to fix the flaky "Router styles › should refresh the page when stylesheet loading fails" e2e test intest/e2e/specs/interactivity/router-styles.spec.ts. It changes 3 files:test/e2e/specs/interactivity/router-styles.spec.ts: the route handler for the red stylesheet now aborts only the first request (tracked with aninterceptedvariable) and lets later requests continue, instead of callingpage.unrouteAll()from inside the handler while the request is in flight. The route is removed withpage.unroute()at the end of the test.packages/e2e-tests/plugins/interactive-blocks/router-styles-wrapper/render.php: the "Hydrated" marker now waits for actual hydration, bindinghiddento!state.hydratedand setting that state through adata-wp-init="callbacks.setHydrated"callback.packages/e2e-tests/plugins/interactive-blocks/router-styles-wrapper/view.js: adds thehydratedstate and thesetHydratedcallback, and wraps thenavigateaction inwithSyncEventbecause it callse.preventDefault().Why?
The test fails intermittently on the
wp/6.9stack. In https://github.com/WordPress/gutenberg/actions/runs/37631034461 (job "Playwright - 7") it failed on every retry atrouter-styles.spec.ts:316, expecting colorrgb(255, 0, 0)but receivingrgb(160, 12, 60). In the same push it was reported as flaky (passed on retry) in 5 other 6.9 PR runs.wp/7.0andwp/7.1already include #72783 in the branch itself, andwp/6.8and older do not haverouter-styles.spec.ts, sowp/6.9is the only branch that needs this backport.How?
A straight cherry-pick of 5a899df from trunk. It applied cleanly, and
@wordpress/interactivityon this branch already exportswithSyncEvent.Use of AI Tools
This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.
🤖 Generated with Claude Code