[REPLACED] fix: Misc ohif-downstream integration test failures#5907
[REPLACED] fix: Misc ohif-downstream integration test failures#5907wayfarer3130 wants to merge 23 commits into
Conversation
Update to grid comparison
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Viewers
|
||||||||||||||||||||||||||||
| Project |
Viewers
|
| Branch Review |
fix/cs3d-combined-integration
|
| Run status |
|
| Run duration | 02m 17s |
| Commit |
|
| Committer | Bill Wallace |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
37
|
| View all changes introduced in this branch ↗︎ | |
There was a problem hiding this comment.
This test waits for the images to render after loading - so it can be really fast if stuff is in cache, but can wait quite a while on slow systems, rather than using a fixed delay and just hoping it works.
There was a problem hiding this comment.
@GhadeerAlbattarni - this file has changes to prevent updating viewports that haven't been otherwise changed - it allows rendering the gray part of the image area on the 3d four up spec test.
There was a problem hiding this comment.
@GhadeerAlbattarni - I think you need this file too.
There was a problem hiding this comment.
@GhadeerAlbattarni - this is some testing for the changes.
There was a problem hiding this comment.
And this fixes the hyrdation so that it loads the viewports clicking "load", otherwise those don't get applied.
There was a problem hiding this comment.
@GhadeerAlbattarni - I think you need this bit to notify the viewports they need to render.
Being replaced by individual changes for some of this.
Miscellaneous ohif-downstream integration test failures
No functional changes
Context
Changes & Results
Update to grid comparison for 3D tests
What are the effects of this change?
-->
Testing
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment
Greptile Summary
This PR fixes flaky downstream integration test failures in the 3D viewport tests by scoping the screenshot comparison from the full page to only the
viewport-gridelement (viaviewportPageObject.grid). Updated baseline screenshots are included to match the new comparison area.tests/3DFourUp.spec.ts&tests/3DMain.spec.ts:viewportPageObjectfixture added to the test destructuring; the second argument tocheckForScreenshotchanged frompage(full-page screenshot) toviewportPageObject.grid(data-testid="viewport-grid"locator). Test names updated with a "grid compare" suffix to reflect the change.threeDFourUpDisplayedCorrectly.pngandthreeDMainDisplayedCorrectly.pngregenerated to match the narrowed comparison region.ViewportPageObject.gridgetter correctly returnsthis.page.getByTestId('viewport-grid'), which is a validLocator | Pageinput forcheckForScreenshot, so there are no type or runtime concerns.Confidence Score: 5/5
viewportPageObject.grid) which is already defined and properly typed inViewportPageObject.ts. ThecheckForScreenshotutility acceptsLocator | Pageso the call is type-correct. No application logic is touched.Important Files Changed
viewportPageObjectfixture and changes screenshot comparison from full-page (page) to the viewport grid locator; test name updated to reflect "grid compare" intent.pagefor the screenshot target and test name updated; no logic issues found.Sequence Diagram
sequenceDiagram participant Test as 3D Spec Test participant Fixture as Playwright Fixture participant VP as ViewportPageObject participant Check as checkForScreenshot participant Expect as expect(locator) Test->>Fixture: destructure { page, mainToolbarPageObject, viewportPageObject } Fixture-->>Test: viewportPageObject = new ViewportPageObject(page) Test->>VP: viewportPageObject.grid VP-->>Test: page.getByTestId("viewport-grid") [Locator] Note over Test: Before fix: checkForScreenshot(page, page, path)<br/>After fix: checkForScreenshot(page, viewportPageObject.grid, path) Test->>Check: checkForScreenshot(page, gridLocator, screenshotPath) Check->>Expect: expect(gridLocator).toHaveScreenshot(path, options) Expect-->>Check: pass / fail (scoped to viewport-grid only) Check-->>Test: true or throwsLast reviewed commit: "fix: Misc ohif-downs..."