test(ContourSegNavigation): Add e2e tests for contour segmentation navigation (#5834)

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
diattamoandgreptile-apps[bot] authored and GitHub committed 2026-03-03 16:52:03 -05:00
1 parent b6d362f375
commit f2ed4c9e6f
7 files changed
+205 -3

No files matched your search

+4
View File
@@ -61,3 +61,7 @@ export async function assertBoundingBoxIsContainedWithin({
`${innerBoxLabel} bottom edge should be within ${outerBoxLabel}`
).toBeLessThanOrEqual(outerBox.y + outerBox.height);
}
export async function expectRowSelected(rowObject) {
await expect(rowObject.locator).toContainClass('bg-popover');
}
+11
View File
@@ -0,0 +1,11 @@
import { ViewportPageObject } from '../pages/ViewportPageObject';
const getSvgPath = async (viewportPageObject: ViewportPageObject, viewportId = 'default') => {
return viewportPageObject
.getById(viewportId)
.svg('path')
.first()
.getAttribute('d');
};
export { getSvgPath };
+4
View File
@@ -16,6 +16,8 @@ import { clearAllAnnotations } from './clearAllAnnotations';
import { scrollVolumeViewport } from './scrollVolumeViewport';
import { attemptAction } from './attemptAction';
import { addLengthMeasurement } from './addLengthMeasurement';
import { getSvgPath } from './getSvgPath';
import { navigateWithViewportArrow } from './navigateWithViewportArrow';
import { test, expect } from './fixture';
import { subscribeToMeasurementAdded } from './subscribeToMeasurement';
@@ -38,6 +40,8 @@ export {
attemptAction,
addLengthMeasurement,
subscribeToMeasurementAdded,
getSvgPath,
navigateWithViewportArrow,
test,
expect,
};
+13
View File
@@ -0,0 +1,13 @@
import { ViewportPageObject } from '../pages/ViewportPageObject';
const navigateWithViewportArrow = async (
viewportPageObject: ViewportPageObject,
direction: 'next' | 'prev',
viewportId = 'default'
) => {
const viewport = viewportPageObject.getById(viewportId);
await viewport.navigationArrows[direction].click();
};
export { navigateWithViewportArrow };