From fe762b68e8428fe5d5edf94c4d0ce856c4a04a47 Mon Sep 17 00:00:00 2001 From: diattamo Date: Fri, 27 Mar 2026 09:54:36 -0400 Subject: [PATCH] chore(tests): contour segment interactions e2e tests - rename and togglevisibility (#5891) --- .../components/OHIFDialogs/InputDialog.tsx | 1 + .../SegmentationTable/AddSegmentRow.tsx | 6 + tests/ContourSegmentRename.spec.ts | 57 +++++++++ tests/ContourSegmentToggleVisibility.spec.ts | 113 ++++++++++++++++++ tests/pages/DOMOverlayPageObject.ts | 8 ++ tests/pages/RightPanelPageObject.ts | 30 ++++- 6 files changed, 214 insertions(+), 1 deletion(-) create mode 100644 tests/ContourSegmentRename.spec.ts create mode 100644 tests/ContourSegmentToggleVisibility.spec.ts diff --git a/platform/ui-next/src/components/OHIFDialogs/InputDialog.tsx b/platform/ui-next/src/components/OHIFDialogs/InputDialog.tsx index ee667375f..dd400c7fe 100644 --- a/platform/ui-next/src/components/OHIFDialogs/InputDialog.tsx +++ b/platform/ui-next/src/components/OHIFDialogs/InputDialog.tsx @@ -206,6 +206,7 @@ const ActionsSecondary = React.forwardRef = ({ childr onToggleSegmentationRepresentationVisibility, data, showAddSegment, + segmentationRepresentationTypes } = useSegmentationTableContext('AddSegmentRow'); // Try to get from expanded context first, then fall back to active segmentation @@ -47,6 +48,10 @@ export const AddSegmentRow: React.FC<{ children?: React.ReactNode }> = ({ childr const allowAddSegment = showAddSegment && !disableEditing; + const dataCyTypeSuffix = segmentationRepresentationTypes + ? `-${segmentationRepresentationTypes[0]}` + : ''; + return (
@@ -65,6 +70,7 @@ export const AddSegmentRow: React.FC<{ children?: React.ReactNode }> = ({ childr