test(contour): add fill, outline and opacity contour display coverage - #6260
test(contour): add fill, outline and opacity contour display coverage#6260diattamo wants to merge 4 commits into
Conversation
… freehand contour drawing utility
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe changes centralize segmentation configuration access, add a reusable freehand contour drawing helper, and add Playwright coverage for contour fill opacity, outline width, display modes, and re-rendering. ChangesSegmentation display tests
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change adds contour appearance test coverage and supporting test utilities; no current merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Context
The contour segmentation appearance config had no E2E coverage: nothing asserted that the
display mode tabs (fill / outline / fill & outline), the fill opacity and the outline width
actually change what is rendered. This adds that coverage and extends the contour test suite
(#6117, #6206, #6236).
Changes & Results
New spec (
ContourSegmentationFillOutlineOpacity.spec.ts, 6 tests)two segments.
alpha does not silently turn the fill display off.
applies the alpha chosen while it was hidden.
Every assertion reads the rendered SVG (
fill-opacity,stroke-width,fill) rather than thestate of the panel control, so the tests verify the effect rather than the widget. No
screenshots were added.
Page object (
RightPanelPageObject)getSegmentationConfig(typeSuffix)and
getNumericConfig(control, typeSuffix), replacing two near-identical copies. The displaytabs now expose the
buttonlocator, which carries thedata-statereflecting the selectedmode.
first, matching the way
MainToolbarPageObjectcombines opening a menu with clicking one ofits items. The expand is guarded on the section already being visible, because the toggle
collapses a section that is already expanded.
config.toggle.click()to open the section now callconfig.open(). This removes a latent race: the raw toggle never waited for the section tosettle, so a following action could run against a section that had not finished expanding.
toggleremains for deliberately collapsing.New utility
drawFreehandContour({ segmentationPanel, viewport, path, activateTool })draws a closedfreehand contour along a normalized viewport path, with
activateTool: falsefor the casewhere the tool is still armed from a previous contour.
Testing
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment