47 lines
1.6 KiB
TypeScript
47 lines
1.6 KiB
TypeScript
import { checkForScreenshot, screenShotPaths, test, visitStudy } from './utils';
|
|
import { press } from './utils/keyboardUtils';
|
|
import { assertNumberOfModalityLoadBadges } from './utils/assertions';
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
const studyInstanceUID = '1.3.6.1.4.1.14519.5.2.1.3671.4754.298665348758363466150039312520';
|
|
const mode = 'segmentation';
|
|
await visitStudy(page, studyInstanceUID, mode, 2000);
|
|
});
|
|
|
|
test('should overlay an unhydrated SEG over a display set that the SEG does NOT reference', async ({
|
|
page,
|
|
viewportPageObject,
|
|
}) => {
|
|
await page.getByTestId('study-browser-thumbnail').nth(2).dblclick();
|
|
|
|
await viewportPageObject.getById('default').overlayMenu.dataOverlay.click();
|
|
await page.getByTestId('AddSegmentationDataOverlay-default').click();
|
|
await page.getByText('SELECT A SEGMENTATION').click();
|
|
await page.getByTestId('T2 Weighted Axial Segmentations').click();
|
|
|
|
// Adding an overlay should not show the LOAD button.
|
|
assertNumberOfModalityLoadBadges({ page, expectedCount: 0 });
|
|
|
|
// Hide the overlay menu.
|
|
await viewportPageObject.getById('default').overlayMenu.dataOverlay.click();
|
|
|
|
await page.waitForTimeout(5000);
|
|
|
|
await checkForScreenshot(
|
|
page,
|
|
page,
|
|
screenShotPaths.segDataOverlayForUnreferencedDisplaySetNoHydration.overlayFirstImage
|
|
);
|
|
|
|
// Navigate to the middle image of the default viewport.
|
|
await press({ page, key: 'ArrowDown', nTimes: 12 });
|
|
|
|
await page.waitForTimeout(5000);
|
|
|
|
await checkForScreenshot(
|
|
page,
|
|
page,
|
|
screenShotPaths.segDataOverlayForUnreferencedDisplaySetNoHydration.overlayMiddleImage
|
|
);
|
|
});
|