fix: A couple of changes to enable cs3d integration build (#5944)

* fix: A couple of changes to enable cs3d integration build

* Bun update

* fix: Crosshairs tests due to order changes

* Fix a race in DicomTagBrowser.spec.ts and update the comparison for the screenshot for seg hydration.

* Fix sorting issues by using consistent sort

* fix: Inconsistency in scoord loader.  Will need an update to screenshot

* Fix crosshairs stability issues and random order issues in Scoord

* Update the comparison image

* Update navigate image

* fix: Axios issue

* Update to current CS3D
This commit is contained in:
Bill Wallace authored and GitHub committed 2026-04-10 16:51:37 -04:00
1 parent 66c8e0c195
commit f6bbd5c779
29 files changed
+565 -295

No files matched your search

+28 -5
View File
@@ -255,13 +255,35 @@ export class ViewportPageObject {
get crosshairs() {
const page = this.page;
const crosshairHoverTimeout = 20000;
async function getSlabHandleLocator(locator: Locator) {
const startTime = Date.now();
const rectLocator = locator.locator('rect').first();
const circleLocator = locator.locator('circle').first();
while (Date.now() - startTime < crosshairHoverTimeout) {
if ((await rectLocator.count()) > 0) {
return rectLocator;
}
if ((await circleLocator.count()) > 0) {
return circleLocator;
}
await page.waitForTimeout(250);
}
throw new Error('Could not find slab thickness handle for crosshairs interaction');
}
async function increaseSlabThickness(locator: Locator, lineNumber: number, axis: string) {
const lineLocator = locator.locator('line').nth(lineNumber);
await lineLocator.click({ force: true });
await lineLocator.hover({ force: true });
await lineLocator.hover({ force: true, timeout: crosshairHoverTimeout });
const circleLocator = locator.locator('rect').first();
await circleLocator.hover({ force: true });
const slabHandleLocator = await getSlabHandleLocator(locator);
await slabHandleLocator.hover({ force: true, timeout: crosshairHoverTimeout });
await page.mouse.down();
@@ -280,10 +302,11 @@ export class ViewportPageObject {
async function rotateCrosshairs(locator: Locator, lineNumber: number) {
const lineLocator = locator.locator('line').nth(lineNumber);
await lineLocator.click({ force: true });
await lineLocator.hover({ force: true });
await lineLocator.hover({ force: true, timeout: crosshairHoverTimeout });
const circleLocator = locator.locator('circle').nth(1);
await circleLocator.hover({ force: true });
await circleLocator.waitFor({ state: 'attached', timeout: crosshairHoverTimeout });
await circleLocator.hover({ force: true, timeout: crosshairHoverTimeout });
await page.mouse.down();