test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022)

* Add (better) assertions for area calculation fixes.
* Add SVG and measurement side panel area for freehand ROI test.
* Add Playwright viewport screenshot scope migration guide.
* Update cornerstonjs dependencies to 4.22.8. Ensure all versions of @babel/preset-env are 7.29.5.

---------

Co-authored-by: Ghadeer Albattarni <165973963+GhadeerAlbattarni@users.noreply.github.com>
This commit is contained in:
Joe BoccanfusoandGhadeer Albattarni authored and GitHub committed 2026-05-18 10:36:05 -04:00
1 parent cb0cbe702c
commit fe16e80cf3
174 files changed
+1071 -751

No files matched your search

+16 -3
View File
@@ -11,12 +11,17 @@ test('should hydrate SR reports correctly', async ({
DOMOverlayPageObject,
leftPanelPageObject,
rightPanelPageObject,
viewportPageObject,
}) => {
await rightPanelPageObject.toggle();
await rightPanelPageObject.measurementsPanel.select();
await leftPanelPageObject.loadSeriesByModality('SR');
await page.waitForTimeout(2000);
await checkForScreenshot(page, page, screenShotPaths.srHydration.srPreHydration);
await checkForScreenshot(
page,
viewportPageObject.grid,
screenShotPaths.srHydration.srPreHydration
);
await page.evaluate(() => {
// Access cornerstone directly from the window object
@@ -39,7 +44,11 @@ test('should hydrate SR reports correctly', async ({
await DOMOverlayPageObject.viewport.segmentationHydration.yes.click();
await page.waitForTimeout(2000);
await checkForScreenshot(page, page, screenShotPaths.srHydration.srPostHydration);
await checkForScreenshot(
page,
viewportPageObject.grid,
screenShotPaths.srHydration.srPostHydration
);
await page.evaluate(() => {
// Access cornerstone directly from the window object
@@ -62,5 +71,9 @@ test('should hydrate SR reports correctly', async ({
await rightPanelPageObject.measurementsPanel.panel.nthMeasurement(0).click();
await checkForScreenshot(page, page, screenShotPaths.srHydration.srJumpToMeasurement);
await checkForScreenshot(
page,
viewportPageObject.grid,
screenShotPaths.srHydration.srJumpToMeasurement
);
});