2025-11-20 11:29:14 -03:00
|
|
|
import { checkForScreenshot, screenShotPaths, test, visitStudy } from './utils';
|
2025-07-03 14:08:46 -04:00
|
|
|
|
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
|
|
|
const studyInstanceUID = '1.3.6.1.4.1.25403.345050719074.3824.20170125095438.5';
|
|
|
|
|
const mode = 'viewer';
|
|
|
|
|
await visitStudy(page, studyInstanceUID, mode, 2000);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test('should the context menu completely on screen and is not clipped for a point near the bottom edge of the screen', async ({
|
|
|
|
|
page,
|
2025-12-12 13:46:45 -03:00
|
|
|
DOMOverlayPageObject,
|
2025-11-20 11:29:14 -03:00
|
|
|
mainToolbarPageObject,
|
|
|
|
|
viewportPageObject,
|
2025-07-03 14:08:46 -04:00
|
|
|
}) => {
|
2025-11-20 11:29:14 -03:00
|
|
|
await mainToolbarPageObject.measurementTools.length.click();
|
2026-03-27 16:37:42 -04:00
|
|
|
const activeViewport = await viewportPageObject.active;
|
|
|
|
|
await activeViewport.normalizedClickAt([
|
2025-11-20 11:29:14 -03:00
|
|
|
{ x: 0.45, y: 0.98 },
|
|
|
|
|
{ x: 0.55, y: 0.98 },
|
|
|
|
|
]);
|
2025-07-03 14:08:46 -04:00
|
|
|
|
2025-12-12 13:46:45 -03:00
|
|
|
await DOMOverlayPageObject.viewport.measurementTracking.confirm.click();
|
2025-07-03 14:08:46 -04:00
|
|
|
|
|
|
|
|
await checkForScreenshot(page, page, screenShotPaths.contextMenu.preContextMenuNearBottomEdge);
|
|
|
|
|
|
2026-03-27 16:37:42 -04:00
|
|
|
await activeViewport.normalizedClickAt([{ x: 0.55, y: 0.98 }], 'right');
|
2025-07-03 14:08:46 -04:00
|
|
|
|
|
|
|
|
await checkForScreenshot({
|
|
|
|
|
page,
|
|
|
|
|
locator: page,
|
|
|
|
|
screenshotPath: screenShotPaths.contextMenu.contextMenuNearBottomEdgeNotClipped,
|
|
|
|
|
});
|
|
|
|
|
});
|