test(e2e): Add viewport text hiding for screenshot comparisons#6142
Open
GhadeerAlbattarni wants to merge 2 commits into
Open
test(e2e): Add viewport text hiding for screenshot comparisons#6142GhadeerAlbattarni wants to merge 2 commits into
GhadeerAlbattarni wants to merge 2 commits into
Conversation
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
GhadeerAlbattarni
temporarily deployed
to
fork-pr-approval
July 13, 2026 16:19 — with
GitHub Actions
Inactive
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds viewport page-object methods for hiding overlay text and a viewport screenshot utility that applies those methods before each screenshot comparison attempt. ChangesViewport screenshot text hiding
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant checkForViewportScreenshot
participant IViewportPageObject
participant checkForScreenshot
checkForViewportScreenshot->>IViewportPageObject: Apply selected hide-text methods
checkForViewportScreenshot->>checkForScreenshot: Provide beforeAttempt callback
checkForScreenshot->>checkForViewportScreenshot: Invoke before each attempt
checkForScreenshot-->>checkForViewportScreenshot: Complete screenshot comparison
🚥 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 |
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
Add hide-text methods to
ViewportPageObjectso tests can hide viewport overlay, annotation, orientation marker, demographic, and laterality text before taking screenshots.Add
checkForViewportScreenshot, a viewport-scoped wrapper aroundcheckForScreenshotthat accepts ahideTextoption ('all','overlay','demographic','annotation','laterality','orientationMarker', or an array of those).Extend
checkForScreenshotwith an optionalbeforeAttemptcallback, invoked at the start of each screenshot retry to guard against React re-renders clearing the hidden class during retry cycles.CheckForScreenshotPropsis now exported to allow derived types likecheckForViewportScreenshotto build on it without duplicating the prop definitions.Usage
Testing
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment
Summary by CodeRabbit