feat(test): Playwright testing integration (#4146)

This commit is contained in:
Ibrahim authored and GitHub committed 2024-05-21 14:48:35 -04:00
1 parent 856cd17531
commit fe1a706446
26 files changed
+434 -215

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import { Page } from '@playwright/test';
/**
* Visit the study
* @param page - The page to interact with
* @param title - The study instance UID of the study to visit
* @param mode - The mode to visit the study in
*/
export async function visitStudy(page: Page, studyInstanceUID: string, mode: string) {
await page.goto('/?resultsPerPage=100');
await page.getByTestId('confirm-and-hide-button').click();
await page.getByTestId(studyInstanceUID).click();
await page.getByRole('button', { name: mode }).click();
await page.waitForLoadState('domcontentloaded');
await page.waitForLoadState('networkidle');
}