fix(sr): sr hydration and load was not working, Screenshot Comparison, and Testing (#4814)
This commit is contained in:
1 parent
1f5c60bbda
commit
9233143b9d
23 files changed
+213
-21
No files matched your search
@@ -12,8 +12,48 @@ test('should hydrate SR reports correctly', async ({ page }) => {
|
||||
await page.getByTestId('trackedMeasurements-btn').click();
|
||||
await page.getByTestId('study-browser-thumbnail-no-image').dblclick();
|
||||
await checkForScreenshot(page, page, screenShotPaths.srHydration.srPreHydration);
|
||||
|
||||
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.srHydration.srPostHydration);
|
||||
|
||||
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.scroll(20);
|
||||
viewport.render();
|
||||
}
|
||||
});
|
||||
|
||||
await page.getByTestId('data-row').first().click();
|
||||
await checkForScreenshot(page, page, screenShotPaths.srHydration.srJumpToMeasurement);
|
||||
});
|
||||
Reference in new issue
Block a user