Repository navigation
fix(statechart-dashboard): wait for the opened chart by its id in verify - #18
Merged
Merged
Conversation
verify() opened a chart and then waited until the page heading showed the chart's title. Two charts can share a title. For the second of them the wait returned at once, while the page still showed the first chart. The page then drew the second chart on its hashchange event, so the next click on Fit hit a detached node. The wait now also needs the navigation to mark this chart's id as the current page. The page sets that mark in the same step that draws the chart.
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.
Why
chen builds one page of all 55 enhanced-server v2 statecharts with the
statechart-dashboardskill. Itsverify.mjsfailed on that page in 4 of 10 runs, with "Node is detached from document" or "Node is either not clickable or not an Element". A check that fails at random cannot gate anything.Two charts on that page share the title "RFQ expiry and settlement". After a click in the navigation,
verifywaited for the heading to show the chart's title. For the second of the two charts, the wait returned while the page still showed the first one. The page then drew the second chart and replaced the Fit button thatverifywas about to click.What changed
verifynow waits until the navigation marks the chart's id as the current page. It still checks the heading.Scope
Tradeoffs
verifytime out on every page built before this change, soverifyreads the navigation mark that pages already have.Blast Radius
Only
verify.mjschanges. A page whose navigation never marks the open chart would now time out, and the template always sets that mark.Verification
verifyon the 55-chart page, with puppeteer-core and the system Chrome. Before the fix, 6 passed and 4 failed, and all 4 failures stopped at the Fit click on line 33. After the fix, 10 passed.verifythat logs the chart the page shows after the wait printed "wait returned for cron-options-rfq-settlement-out-ChartVault while the page shows cron-options-rfq-settlement" in each of 3 failed runs. It printed nothing in the 2 runs that passed.bun testinskills/statechart-dashboard/scriptspasses 3 of 3, andnode scripts/verify.mjspasses.