ohif-viewer/tests/utils
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
..
addLengthMeasurement.ts refactor(tests): update viewport page object usage to async and update all effected tests (#5927) 2026-03-27 16:37:42 -04:00
assertions.ts chore(testing): Playwright tests for contour segmentation create, update, delete interactions (#6091) 2026-06-24 10:36:16 -04:00
attemptAction.ts fix(CinePlayer): always show cine player for dynamic data (#4575) 2024-12-05 11:30:21 -05:00
checkForScreenshot.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
clearAllAnnotations.ts Test: Playwright tests for tmtv (#4331) 2024-08-15 21:57:04 -04:00
contourShowOnlyNthSegment.ts test(contour): Add the ContourSegmentToggleLock.spec.ts test file to test contour locking (#6072) 2026-06-23 01:52:35 -04:00
download.ts chore(tests): update screenshots (#5413) 2025-09-17 15:35:13 -04:00
fixture.ts feat(slice scrollbar): Integrate ViewportSliceProgressScrollbar with customizations and docs (#5960) 2026-04-23 08:46:03 -04:00
getAnnotationStats.ts chore(testing): Setup new self-hosted test runner (#6067) 2026-06-18 11:21:41 -04:00
getSUV.ts Test: Playwright tests for tmtv (#4331) 2024-08-15 21:57:04 -04:00
getSvgAttribute.ts feat(tests): Add tests for duplicating contour segments (#6002) 2026-05-20 21:18:58 -04:00
getTMTVModalityUnit.ts Test: Playwright tests for tmtv (#4331) 2024-08-15 21:57:04 -04:00
index.ts feat: Add customization URL parameter (#5992) 2026-07-07 15:30:27 -04:00
keyboardUtils.ts fix(segmentation): Added support for unhydrated RTSTRUCT in MPR. Added support for overlaying segmentations over display sets the segmentations do not reference. (#5168) 2025-07-02 08:38:22 -04:00
mouseUtils.ts chore: recovery 2 (#5014) merge to 3.11 (#5175) 2025-07-03 14:08:46 -04:00
navigateWithViewportArrow.ts refactor(tests): update viewport page object usage to async and update all effected tests (#5927) 2026-03-27 16:37:42 -04:00
OHIFConfiguration.ts feat(slice scrollbar): Integrate ViewportSliceProgressScrollbar with customizations and docs (#5960) 2026-04-23 08:46:03 -04:00
reduce3DviewportSize.ts Test: Playwright tests for tmtv (#4331) 2024-08-15 21:57:04 -04:00
screenShotPaths.ts fix(wsi): mount WSI/SM viewports via setDisplaySets (#6107) 2026-07-02 08:57:13 -04:00
scrollVolumeViewport.ts Test: Playwright tests for tmtv (#4331) 2024-08-15 21:57:04 -04:00
simulateClicksOnElement.ts fix(ArrowAnnotate): Allow free-form text for arrow annotations (#5259) 2025-07-24 12:58:45 -04:00
simulateDragOnElement.ts test(e2e): update Playwright screenshots and add better tests and assertions for area calculations (#6022) 2026-05-18 10:36:05 -04:00
subscribeToMeasurement.ts chore(test): add FreehandROI test that MEASUREMENT_ADDED does not fire when clicking annotation text (#5846) 2026-03-02 08:12:28 -05:00
visitStudy.ts feat: Add customization URL parameter (#5992) 2026-07-07 15:30:27 -04:00
visitStudyAndHydrate.ts test(contour): Add the ContourSegmentToggleLock.spec.ts test file to test contour locking (#6072) 2026-06-23 01:52:35 -04:00
waitForViewportsRendered.ts fix: ohif tests to run with cornerstone 3d 5.0 (#6043) 2026-06-09 20:25:14 -04:00