Repository navigation
test(e2e): assert the configured-scope row after the theme-refresh re-render - #2180
Merged
Merged
Conversation
…-render Every page load fires one theme-refresh about 300 ms after the theme loads, and live.js re-runs showNodeDetail on it, which swaps #nodeDetailContent to "Loading…" before it renders again. The test waited for the detail table and then called the non-waiting row.isVisible(), so a refresh landing in between failed the live #fixture case. The null-scope case could pass on the "Loading…" panel for the same reason. Wait for the refresh to have fired, then for the detail again, before asserting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
test-issue-1648-m2-icons-e2e.jsnow asserts the configured-scope row only after the page'stheme-refreshre-render has fired and the detail has rendered again.Why
On 2026-10-10 this assertion failed CI on four PRs (#2169, #2171, #2154, #2164), each time at the first live-map case:
confirmed scope row must be visible, including an empty scope. A re-run of the failed jobs passed every time.The code path:
customize-v2.js:814dispatchestheme-changedonce/api/config/themeresolves, on every page load.app.js:1309-1315turns that intotheme-refresh300 ms later.live.js:4713re-runsshowNodeDetail(activeNodeDetailKey)ontheme-refresh, andshowNodeDetailfirst sets#nodeDetailContentto "Loading…" (live.js:2598). This is the only caller besides the marker click (live.js:3090).#nodeDetailContent tableand then calledrow.isVisible(), which does not wait. A refresh landing between the two fails the check.The same race could let the null-scope case pass on the "Loading…" panel, because
row.count() === 0holds there too.The fix uses the same
addInitScriptflag pattern astest-e2e-playwright.js:83.Testing
/api/config/themedelayed by 1 s, 5 with 8x CPU throttling. So the reasoning above comes from the code path and the four CI failures, not from a local red-then-green.