2025-07-15 15:02:36 +02:00
|
|
|
import { Page } from '@playwright/test';
|
|
|
|
|
import { expect } from 'playwright-test-coverage';
|
|
|
|
|
|
2025-12-12 17:46:45 +01:00
|
|
|
import { DOMOverlayPageObject } from '../pages';
|
|
|
|
|
|
2025-07-15 15:02:36 +02:00
|
|
|
/**
|
|
|
|
|
* Asserts the number of Modality Load Badges present on the page.
|
|
|
|
|
*/
|
|
|
|
|
export async function assertNumberOfModalityLoadBadges({
|
|
|
|
|
page,
|
|
|
|
|
expectedCount,
|
|
|
|
|
}: {
|
|
|
|
|
page: Page;
|
|
|
|
|
expectedCount: number;
|
|
|
|
|
}) {
|
2025-12-12 17:46:45 +01:00
|
|
|
const domOverlayPageObject = new DOMOverlayPageObject(page);
|
|
|
|
|
const count = await domOverlayPageObject.viewport.getModalityLoadBadgeCount();
|
|
|
|
|
|
|
|
|
|
expect(count).toBe(expectedCount);
|
2025-07-15 15:02:36 +02:00
|
|
|
}
|