From 01939e2236660e9d14643d3a4136e72fd010cd1e Mon Sep 17 00:00:00 2001 From: Ghadeer Albattarni <165973963+GhadeerAlbattarni@users.noreply.github.com> Date: Sat, 11 Jul 2026 02:21:39 -0400 Subject: [PATCH] test: add E2E test for contour combine intersect and subtract operations (#6131) --- .../LogicalContourOperationsOptions.tsx | 8 +- .../SegmentationTableConfig.tsx | 15 ++- tests/ContourCombineOperations.spec.ts | 118 ++++++++++++++++++ tests/pages/RightPanelPageObject.ts | 48 +++++++ .../intersectBigSphereSmallSphereResult.png | Bin 0 -> 27550 bytes ...ubtractBigSphereMinusSmallSphereResult.png | Bin 0 -> 30049 bytes tests/utils/screenShotPaths.ts | 4 + 7 files changed, 189 insertions(+), 4 deletions(-) create mode 100644 tests/ContourCombineOperations.spec.ts create mode 100644 tests/screenshots/chromium/ContourCombineOperations.spec.ts/intersectBigSphereSmallSphereResult.png create mode 100644 tests/screenshots/chromium/ContourCombineOperations.spec.ts/subtractBigSphereMinusSmallSphereResult.png diff --git a/extensions/cornerstone-dicom-seg/src/components/LogicalContourOperationsOptions.tsx b/extensions/cornerstone-dicom-seg/src/components/LogicalContourOperationsOptions.tsx index e0abd2ede..6183dd2d6 100644 --- a/extensions/cornerstone-dicom-seg/src/components/LogicalContourOperationsOptions.tsx +++ b/extensions/cornerstone-dicom-seg/src/components/LogicalContourOperationsOptions.tsx @@ -70,7 +70,10 @@ function SegmentSelector({ onValueChange={onValueChange} value={value} > - + @@ -180,6 +183,7 @@ function LogicalContourOperationOptions() { value={value} key={`logical-contour-operation-${value}`} onClick={() => setOperation(option)} + data-cy={`logical-contour-operation-${value}`} > @@ -207,6 +211,7 @@ function LogicalContourOperationOptions() { />