chore(test): add FreehandROI test that MEASUREMENT_ADDED does not fire when clicking annotation text (#5846)
This commit is contained in:
1 parent
c9dea4e6cc
commit
92011c587f
5 files changed
+92
No files matched your search
@@ -0,0 +1,34 @@
|
||||
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();
|
||||
await viewportPageObject.active.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 = viewportPageObject.active.nthAnnotation(0);
|
||||
await annotation.text.click();
|
||||
|
||||
await expect(measurementAdded.waitFired(1000)).rejects.toThrow();
|
||||
|
||||
} finally {
|
||||
await measurementAdded.unsubscribe();
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user