chore(testing): Playwright tests for contour segmentation create, update, delete interactions (#6091)

This commit is contained in:
diattamo authored and GitHub committed 2026-06-24 10:36:16 -04:00
1 parent 20632f97cf
commit 79cb2356e1
3 files changed
+320 -1

No files matched your search

+15
View File
@@ -2,6 +2,7 @@ import { Locator, Page } from '@playwright/test';
import { expect } from 'playwright-test-coverage';
import { DOMOverlayPageObject } from '../pages';
import type { SegmentationSelect } from '../pages/RightPanelPageObject';
/**
* Asserts the number of Modality Load Badges present on the page.
@@ -73,3 +74,17 @@ export async function expectRowLocked(rowObject: { lockIcon: Locator }) {
export async function expectRowUnlocked(rowObject: { lockIcon: Locator }) {
await expect(rowObject.lockIcon, 'Expected the row to not show the lock icon').toHaveCount(0);
}
export async function expectRowNotSelected(rowObject) {
await expect(rowObject.locator).not.toContainClass('bg-popover');
}
// Opens the segmentation selector, asserts its options match `labels`, then closes it.
export async function expectSegmentationLabels(
segmentationSelect: SegmentationSelect,
labels: string[]
) {
const options = await segmentationSelect.getSegmentationLabels();
await expect(options).toHaveText(labels);
await segmentationSelect.close();
}