fix(sr): sr hydration and load was not working, Screenshot Comparison, and Testing (#4814)

This commit is contained in:
Alireza authored and GitHub committed 2025-02-26 11:23:40 -05:00
1 parent 1f5c60bbda
commit 9233143b9d
23 files changed
+213 -21

No files matched your search

+20 -2
View File
@@ -11,8 +11,26 @@ test('should hydrate SEG reports correctly', async ({ page }) => {
await page.getByTestId('side-panel-header-right').click();
await page.getByTestId('study-browser-thumbnail-no-image').dblclick();
await checkForScreenshot(page, page, screenShotPaths.segHydration.segPreHydration);
await page.evaluate(() => {
// Access cornerstone directly from the window object
const cornerstone = window.cornerstone;
if (!cornerstone) {
return;
}
const enabledElements = cornerstone.getEnabledElements();
if (enabledElements.length === 0) {
return;
}
const viewport = enabledElements[0].viewport;
if (viewport) {
viewport.setZoom(4);
viewport.render();
}
});
await page.getByTestId('yes-hydrate-btn').click();
await checkForScreenshot(page, page, screenShotPaths.segHydration.segPostHydration);
await page.getByText('Esophagus').click();
await checkForScreenshot(page, page, screenShotPaths.segHydration.segJumpToSegment);
});