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
@@ -194,6 +194,17 @@ export class MainToolbarPageObject {
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
get freehandROI() {
|
||||
const button = page.getByTestId('PlanarFreehandROI');
|
||||
return {
|
||||
button,
|
||||
async click() {
|
||||
await measurementTools.click();
|
||||
await button.click();
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,10 @@ export interface IViewportPageObject {
|
||||
contextMenu: {
|
||||
open: () => Promise<void>;
|
||||
};
|
||||
text: {
|
||||
locator: Locator;
|
||||
click: () => Promise<void>;
|
||||
};
|
||||
};
|
||||
clickAt: (
|
||||
points: { x: number; y: number }[],
|
||||
@@ -75,6 +79,7 @@ export class ViewportPageObject {
|
||||
const page = this.page;
|
||||
const domOverlayPageObject = new DOMOverlayPageObject(page);
|
||||
const annotation = viewport.locator('g[data-annotation-uid]').nth(nth);
|
||||
const textLocator = annotation.locator('text').first();
|
||||
|
||||
return {
|
||||
locator: annotation,
|
||||
@@ -86,6 +91,12 @@ export class ViewportPageObject {
|
||||
await domOverlayPageObject.viewport.annotationContextMenu.open(annotation);
|
||||
},
|
||||
},
|
||||
text: {
|
||||
locator: textLocator,
|
||||
click: async () => {
|
||||
await textLocator.click({ force: true });
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user