init: sudah ganti logo, hilangin setting, dan investigational use dialog
This commit is contained in:
42
tests/RTHydration2.spec.ts
Normal file
42
tests/RTHydration2.spec.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { test } from '@playwright/test';
|
||||
import { visitStudy, checkForScreenshot, screenShotPaths } from './utils';
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
const studyInstanceUID = '1.3.6.1.4.1.5962.99.1.2968617883.1314880426.1493322302363.3.0';
|
||||
const mode = 'viewer';
|
||||
await visitStudy(page, studyInstanceUID, mode, 2000);
|
||||
});
|
||||
|
||||
test('should hydrate RT 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.rtHydration2.rtPreHydration);
|
||||
// wait for 3 seconds
|
||||
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.waitForTimeout(3000);
|
||||
|
||||
//
|
||||
|
||||
// should preserve zoom and pan and scroll position after hydration
|
||||
await page.getByTestId('yes-hydrate-btn').click();
|
||||
await checkForScreenshot(page, page, screenShotPaths.rtHydration.rtPostHydration);
|
||||
});
|
||||
Reference in New Issue
Block a user