ohif-viewer/tests
Bill Wallace 3dd5c70cb2
feat: Add customization URL parameter (#5992)
* Add customization URL parameter

* fix: Preserve should be customizeable

* Update customizations docs

* fix: Overlay items on patient name

* Add customization test

* Fix resolve to absolute path

* fix: Warn on no data in load

* Remove unused customization stuff

* fix: PR comments

* Update stored parameters to only use an array for mulitples

* Remove requires ohif.* special call out

* Remove strict mode

* PR comments

* Document segmentation examples

* Add three examples as requested

* PR comments

* lock

* Remove old customizatoin export

* fix: Ordering issues on customization loads

* fix: Use correct default for dev builds app config

* Fixes for conflicts

* chore: restore pnpm-lock.yaml to match master

The lockfile diff was incidental peer-descriptor churn and carried no
functional dependency change. It tripped the CircleCI security-audit gate
(which only runs when pnpm-lock.yaml is in the PR diff), surfacing a
pre-existing critical `decompress` transitive vuln that also exists on
master. Restoring master's lockfile removes the audit trigger.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(ci): restore json5 lockfile entry; ignore unfixable decompress GHSA

The previous commit restored pnpm-lock.yaml from master, which dropped the
json5@2.2.3 entry that platform/core legitimately depends on (JSONC parsing
for the customization feature). That broke `--frozen-lockfile` install
(ERR_PNPM_OUTDATED_LOCKFILE). This restores the correct lockfile.

Because the lockfile must change (json5), the CircleCI security-audit gate
runs and previously failed on a critical `decompress` <=4.2.1 zip-slip
advisory. This is a pre-existing transitive vuln (present on master too) with
no published patch — decompress's latest release is 4.2.1, so no version
bump/override can resolve it. It reaches the tree only via @itk-wasm/dam, a
build/data-asset extraction tool under @cornerstonejs/labelmap-interpolation.

Add GHSA-mp2f-45pm-3cg9 to the existing pnpm-workspace.yaml auditConfig
ignoreGhsas accepted-risk list, matching how the repo already exempts other
build-tooling advisories. `pnpm audit --audit-level high` now passes locally
(1 critical ignored, 0 high).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(e2e): fix visitStudy URL encoding that broke mpr2 study load

The visitStudy rewrite (added for the ?customization= option) built the URL
with new URLSearchParams({ StudyInstanceUIDs: studyInstanceUID }), which
percent-encodes the value. mpr2.spec.ts embeds an extra param in the UID
string ('<uid>&hangingprotocolid=mpr'), so the & and = were encoded and the
whole thing collapsed into one invalid StudyInstanceUIDs value -> the study
could not be found ('studies are not available'), the viewer never rendered,
and the side-panel-header-right click timed out.

Restore master's raw concatenation for StudyInstanceUIDs (so embedded params
survive as separate query params) while still appending the customization
option separately. Only mpr2 embeds & in the UID, matching the single failure.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* PR comments

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 15:30:27 -04:00
..
pages fix(hotkeyBindings): consolidate Escape hotkey behavior for contour drawing tools (#6104) 2026-06-26 08:20:22 -04:00
screenshots/chromium fix(wsi): mount WSI/SM viewports via setDisplaySets (#6107) 2026-07-02 08:57:13 -04:00
utils feat: Add customization URL parameter (#5992) 2026-07-07 15:30:27 -04:00
3DFourUp.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
3DMain.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
3DOnly.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
3DPrimary.spec.ts chore(testing): Setup new self-hosted test runner (#6067) 2026-06-18 11:21:41 -04:00
Angle.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
ArrowAnnotate.spec.ts chore(testing): Setup new self-hosted test runner (#6067) 2026-06-18 11:21:41 -04:00
AxialPrimary.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
Bidirectional.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
BSplineContourSegmentation.spec.ts fix(hotkeyBindings): consolidate Escape hotkey behavior for contour drawing tools (#6104) 2026-06-26 08:20:22 -04:00
CatmullRomSplineContourSegmentation.spec.ts fix(hotkeyBindings): consolidate Escape hotkey behavior for contour drawing tools (#6104) 2026-06-26 08:20:22 -04:00
Circle.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
CobbAngle.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
ContextMenu.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
ContourSegLocking.spec.ts feat(slice scrollbar): Integrate ViewportSliceProgressScrollbar with customizations and docs (#5960) 2026-04-23 08:46:03 -04:00
ContourSegmentationCrudInteractions.spec.ts chore(testing): Playwright tests for contour segmentation create, update, delete interactions (#6091) 2026-06-24 10:36:16 -04:00
ContourSegmentColorChange.spec.ts test(segmentation): switch getSegmentCount to expect(rows).toHaveCount in panel specs (#6105) 2026-06-24 11:05:27 -04:00
ContourSegmentDelete.spec.ts test(segmentation): switch getSegmentCount to expect(rows).toHaveCount in panel specs (#6105) 2026-06-24 11:05:27 -04:00
ContourSegmentDuplicate.spec.ts test(segmentation): switch getSegmentCount to expect(rows).toHaveCount in panel specs (#6105) 2026-06-24 11:05:27 -04:00
ContourSegmentRename.spec.ts test(contour): Add the ContourSegmentToggleLock.spec.ts test file to test contour locking (#6072) 2026-06-23 01:52:35 -04:00
ContourSegmentToggleLock.spec.ts test(contour): Add the ContourSegmentToggleLock.spec.ts test file to test contour locking (#6072) 2026-06-23 01:52:35 -04:00
ContourSegmentToggleVisibility.spec.ts test(contour): Add the ContourSegmentToggleLock.spec.ts test file to test contour locking (#6072) 2026-06-23 01:52:35 -04:00
ContourSegNavigation.spec.ts test(contour): Add the ContourSegmentToggleLock.spec.ts test file to test contour locking (#6072) 2026-06-23 01:52:35 -04:00
Crosshairs.spec.ts fix: ohif tests to run with cornerstone 3d 5.0 (#6043) 2026-06-09 20:25:14 -04:00
Customization.spec.ts feat: Add customization URL parameter (#5992) 2026-07-07 15:30:27 -04:00
DataOverlayMenu.spec.ts refactor(tests): update viewport page object usage to async and update all effected tests (#5927) 2026-03-27 16:37:42 -04:00
DataOverlayMenuFrameOfReference.spec.ts fix(segmentation): restrict overlay segmentation menu to same frame of reference as viewport background display set (#5900) 2026-04-02 08:52:23 -04:00
DicomTagBrowser.spec.ts fix(test): stabilize DICOM Tag Browser scrollbar screenshot (#6118) 2026-06-30 09:25:37 -04:00
Ellipse.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
FlipHorizontal.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
FreehandROI.spec.ts feat: Update to use pnpm (#6031) 2026-06-12 16:04:56 -04:00
globalSetup.ts feat: Update to use pnpm (#6031) 2026-06-12 16:04:56 -04:00
Invert.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
JumpToMeasurementMPR.spec.ts fix: ohif tests to run with cornerstone 3d 5.0 (#6043) 2026-06-09 20:25:14 -04:00
LabelMapSegLocking.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
Length.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
LinearSplineContourSegmentation.spec.ts fix(hotkeyBindings): consolidate Escape hotkey behavior for contour drawing tools (#6104) 2026-06-26 08:20:22 -04:00
Livewire.spec.ts fix(hotkeyBindings): consolidate Escape hotkey behavior for contour drawing tools (#6104) 2026-06-26 08:20:22 -04:00
LivewireContourSegmentation.spec.ts fix(hotkeyBindings): consolidate Escape hotkey behavior for contour drawing tools (#6104) 2026-06-26 08:20:22 -04:00
MeasurementPanel.spec.ts fix: ohif tests to run with cornerstone 3d 5.0 (#6043) 2026-06-09 20:25:14 -04:00
MicroscopyPanel.spec.ts refactor(tests): update viewport page object usage to async and update all effected tests (#5927) 2026-03-27 16:37:42 -04:00
mpr2.spec.ts test(e2e): replace waitForVolumeLoad with viewport render waits (#6000) 2026-05-07 15:42:12 -04:00
MPR.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
MPRThenRTOverlayNoHydration.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
MPRThenSEGOverlayNoHydration.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
MultipleSegmentationDataOverlays.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
Probe.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
Rectangle.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
Reset.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
RotateRight.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
RTContourViewportLayoutChange.spec.ts test(contour): add test for RT contour position after viewport maximize/restore (#6036) 2026-05-22 13:49:00 -04:00
RTDataOverlayForUnreferencedDisplaySetNoHydration.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
RTDataOverlayNoHydrationThenMPR.spec.ts chore(testing): Setup new self-hosted test runner (#6067) 2026-06-18 11:21:41 -04:00
RTHydration2.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
RTHydration.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
RTHydrationDisableConfirmation.spec.ts refactor(tests): update viewport page object usage to async and update all effected tests (#5927) 2026-03-27 16:37:42 -04:00
RTHydrationFromMPR.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
RTHydrationThenMPR.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
RTNoHydrationThenMPR.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
Scoord3dProbe.spec.ts fix: recipe config cleanup, report-only CSP, logout redirect validation (#6124) 2026-07-07 13:18:46 -04:00
ScoordRectangle.spec.ts fix: ohif tests to run with cornerstone 3d 5.0 (#6043) 2026-06-09 20:25:14 -04:00
SEGDataOverlayForUnreferencedDisplaySetNoHydration.spec.ts fix(seg): prevent segmentations from spreading to all viewports before hydration confirmation in 3D four-up (#5967) 2026-04-27 12:55:12 -04:00
SEGDataOverlayNoHydrationThenMPR.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
SEGDrawingToolsResizing.spec.ts refactor(tests): update viewport page object usage to async and update all effected tests (#5927) 2026-03-27 16:37:42 -04:00
SEGHydration.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
SEGHydrationDeleteAndReload.spec.ts test(segmentation): switch getSegmentCount to expect(rows).toHaveCount in panel specs (#6105) 2026-06-24 11:05:27 -04:00
SEGHydrationFrom3DFourUp.spec.ts Fix: Segmentation Hide All fails when switching from 2D to 3D fourUp (#5995) 2026-06-24 15:18:16 -04:00
SEGHydrationFromMPR.spec.ts fix(docs): remove stray tool-call tags breaking the MDX build (#6081) 2026-06-16 11:59:04 -04:00
SEGHydrationThen3DOnly.spec.ts test(segmentation): switch getSegmentCount to expect(rows).toHaveCount in panel specs (#6105) 2026-06-24 11:05:27 -04:00
SEGHydrationThenMPR.spec.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
SegmentationPanel.spec.ts feat: Update to use pnpm (#6031) 2026-06-12 16:04:56 -04:00
SegmentationPanelSelect.spec.ts fix(segmentation): Display "No description S:{series number} {modality}" for segmentations with no label. (#5874) 2026-03-12 18:39:14 -04:00
SegmentationSeriesNavigation.spec.ts fix: prevent black viewport when navigating series with client-created segmentation (#5919) 2026-03-28 19:20:49 -04:00
SEGNoHydrationThenMPR.spec.ts fix: ohif tests to run with cornerstone 3d 5.0 (#6043) 2026-06-09 20:25:14 -04:00
Spline.spec.ts fix(hotkeyBindings): consolidate Escape hotkey behavior for contour drawing tools (#6104) 2026-06-26 08:20:22 -04:00
SRHydration.spec.ts fix: ohif tests to run with cornerstone 3d 5.0 (#6043) 2026-06-09 20:25:14 -04:00
SRHydrationArrowNavigation.spec.ts refactor(tests): update viewport page object usage to async and update all effected tests (#5927) 2026-03-27 16:37:42 -04:00
SRHydrationThenReload.spec.ts fix(colors): Replaces legacy colors with ui-next colors (#5351) 2026-02-12 08:48:05 -05:00
StudyValidation.spec.ts fix(app): display study not found message for all modes (#5752) 2026-02-09 21:51:44 -05:00
TMTVAlignment.spec.ts refactor(tests): update viewport page object usage to async and update all effected tests (#5927) 2026-03-27 16:37:42 -04:00
TMTVCSVReport.spec.ts refactor(tests): update viewport page object usage to async and update all effected tests (#5927) 2026-03-27 16:37:42 -04:00
TMTVModalityUnit.spec.ts refactor(tests): update viewport page object usage to async and update all effected tests (#5927) 2026-03-27 16:37:42 -04:00
TMTVRecalculate.spec.ts refactor(tests): update viewport page object usage to async and update all effected tests (#5927) 2026-03-27 16:37:42 -04:00
TMTVRendering.spec.ts feat(slice scrollbar): Integrate ViewportSliceProgressScrollbar with customizations and docs (#5960) 2026-04-23 08:46:03 -04:00
TMTVSUV.spec.ts refactor(tests): update viewport page object usage to async and update all effected tests (#5927) 2026-03-27 16:37:42 -04:00
WindowLevelOverlayText.spec.ts refactor(tests): update viewport page object usage to async and update all effected tests (#5927) 2026-03-27 16:37:42 -04:00
WSI.spec.ts fix(wsi): mount WSI/SM viewports via setDisplaySets (#6107) 2026-07-02 08:57:13 -04:00
ZoomIn.spec.ts test( zoomIn-tool): verify horizontal flip is preserved in magnified view (#5983) 2026-04-29 10:32:27 -04:00