35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import { expect, test, visitStudy, subscribeToMeasurementAdded } from './utils';
|
|
|
|
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 not fire MEASUREMENT_ADDED when clicking the annotation text', async ({
|
|
page,
|
|
DOMOverlayPageObject,
|
|
mainToolbarPageObject,
|
|
viewportPageObject,
|
|
}) => {
|
|
await mainToolbarPageObject.measurementTools.freehandROI.click();
|
|
const activeViewport = await viewportPageObject.active;
|
|
await activeViewport.normalizedDragAt({
|
|
start: { x: 0.35, y: 0.35 },
|
|
end: { x: 0.6, y: 0.55 },
|
|
config: { steps: 20, delay: 30 },
|
|
});
|
|
|
|
await DOMOverlayPageObject.viewport.measurementTracking.confirm.click();
|
|
|
|
const measurementAdded = await subscribeToMeasurementAdded(page);
|
|
try {
|
|
const annotation = activeViewport.nthAnnotation(0);
|
|
await annotation.text.click();
|
|
|
|
await expect(measurementAdded.waitFired(1000)).rejects.toThrow();
|
|
} finally {
|
|
await measurementAdded.unsubscribe();
|
|
}
|
|
});
|