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

+11 -3
View File
@@ -1,4 +1,4 @@
import { expect, test, visitStudy, getSvgPath, navigateWithViewportArrow } from './utils';
import { expect, test, visitStudy, getSvgAttribute, navigateWithViewportArrow } from './utils';
const studyInstanceUID = '1.2.840.113619.2.290.3.3767434740.226.1600859119.501';
@@ -78,7 +78,11 @@ test('should restore svg paths when segment visibility is toggled on/off', async
const segment0 = rightPanelPageObject.contourSegmentationPanel.panel.nthSegment(0);
await segment0.toggleVisibility();
const svgPathBefore = await getSvgPath(viewportPageObject);
const svgPathBefore = await getSvgAttribute({
viewportPageObject,
svgInnerElement: 'path',
attributeName: 'd',
});
expect(svgPathBefore, 'Expected a visible SVG path for segment 0').not.toBeNull();
await segment0.toggleVisibility();
@@ -88,7 +92,11 @@ test('should restore svg paths when segment visibility is toggled on/off', async
).toHaveCount(0);
await segment0.toggleVisibility();
const svgPathAfter = await getSvgPath(viewportPageObject);
const svgPathAfter = await getSvgAttribute({
viewportPageObject,
svgInnerElement: 'path',
attributeName: 'd',
});
expect(svgPathAfter, 'Expected SVG path to be restored after toggling visibility back on').toBe(
svgPathBefore
);