feat(tests): Add tests for duplicating contour segments (#6002)

This commit is contained in:
diattamo authored and GitHub committed 2026-05-20 21:18:58 -04:00
1 parent d186749c5a
commit 2258c7957a
7 files changed
+232 -31

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import { SvgInnerElement, ViewportPageObject } from '../pages/ViewportPageObject';
const getSvgAttribute = async ({
viewportPageObject,
svgInnerElement,
attributeName,
viewportId = 'default',
nth = 0,
}: {
viewportPageObject: ViewportPageObject;
svgInnerElement: SvgInnerElement;
attributeName: string;
viewportId?: string;
nth?: number;
}) => {
return (await viewportPageObject.getById(viewportId))
.svg(svgInnerElement)
.nth(nth)
.getAttribute(attributeName);
};
export { getSvgAttribute };
-7
View File
@@ -1,7 +0,0 @@
import { ViewportPageObject } from '../pages/ViewportPageObject';
const getSvgPath = async (viewportPageObject: ViewportPageObject, viewportId = 'default') => {
return (await viewportPageObject.getById(viewportId)).svg('path').first().getAttribute('d');
};
export { getSvgPath };
+2 -2
View File
@@ -24,7 +24,7 @@ import { clearAllAnnotations } from './clearAllAnnotations';
import { scrollVolumeViewport } from './scrollVolumeViewport';
import { attemptAction } from './attemptAction';
import { addLengthMeasurement } from './addLengthMeasurement';
import { getSvgPath } from './getSvgPath';
import { getSvgAttribute } from './getSvgAttribute';
import { navigateWithViewportArrow } from './navigateWithViewportArrow';
import { test, expect } from './fixture';
import { subscribeToMeasurementAdded } from './subscribeToMeasurement';
@@ -57,7 +57,7 @@ export {
attemptAction,
addLengthMeasurement,
subscribeToMeasurementAdded,
getSvgPath,
getSvgAttribute,
navigateWithViewportArrow,
waitForAnyViewportNeedsRender,
waitForViewportsRendered,