feat(tests): Add tests for duplicating contour segments (#6002)
This commit is contained in:
1 parent
d186749c5a
commit
2258c7957a
7 files changed
+232
-31
No files matched your search
@@ -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 };
|
||||
@@ -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 };
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user