Repository navigation
test(e2e): wait for the viewport before adding a segmentation - #6338
Draft
wayfarer3130 wants to merge 2 commits into
Draft
wayfarer3130 wants to merge 2 commits into
wayfarer3130 wants to merge 2 commits into
Conversation
The add-segmentation command silently does nothing when it runs before the viewport grid has registered the active viewport. The segmentation panel config tests then timed out waiting for config controls that only render once a segmentation exists. The add click now waits for a rendered viewport, and the spec asserts the segment row before opening the config. waitForViewportsRendered now reports each viewport's status and any unloaded volumes on timeout, to diagnose the intermittent RT MPR hangs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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 |
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…tion-panel-config
Viewers
|
||||||||||||||||||||||||||||
| Project |
Viewers
|
| Branch Review |
test/flaky-segmentation-panel-config
|
| Run status |
|
| Run duration | 01m 51s |
| Commit |
|
| Committer | Bill Wallace |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
28
|
| View all changes introduced in this branch ↗︎ | |
This branch was successfully deployed
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.
Summary
This PR fixes a cause of failures in the segmentation panel config tests. The PR also adds diagnostics for a second intermittent failure in the RT MPR tests.
Segmentation panel config tests
The tests in
SegmentationPanel.spec.ts› "Segmentation panel config input validation for labelmap" fail intermittently in CI. The failures also occur on unrelated branches. ThebeforeEachtimes out atconfig.open()after 10 seconds.The page snapshot at the timeout shows the cause:
createSegmentationForViewportreturnsundefinedand shows no error when the viewport grid has not registered the active viewport yet.SegmentationTableConfigrendersnullwhen no segmentation exists. Thus the opacity control never becomes visible.Changes:
tests/pages/RightPanelPageObject.ts: theaddSegmentationButton.click()method waits until a viewport is rendered before the click. This change applies to all specs that add a labelmap or contour segmentation.tests/SegmentationPanel.spec.ts: thebeforeEachasserts that a segment row exists before it opens the config. If the add step fails again, the error identifies the add step.RT MPR tests (diagnostics only)
RTHydrationThenMPR.spec.tsandRTDataOverlayNoHydrationThenMPR.spec.tsfail intermittently withpage.waitForFunction: Timeout 60000ms exceededinwaitForViewportsRendered. Both tests pass on retry.The failure video shows that the volume is fully loaded and displayed in all three MPR viewports at 30 seconds. Thus the wait does not fail because the load is slow. One condition of the wait never becomes true. This PR does not increase the timeout, because a longer timeout hides the problem.
Change:
tests/utils/waitForViewportsRendered.ts: on a timeout, the error message gives the status of each viewport and the IDs of volumes that did not load. The next failure will show which condition stays false.Test plan
🤖 Generated with Claude Code