diff --git a/playwright.config.ts b/playwright.config.ts index b31696188..4245ce762 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -8,12 +8,7 @@ export default defineConfig({ workers: process.env.CI ? 1 : undefined, snapshotPathTemplate: './tests/screenshots{/projectName}/{testFilePath}/{arg}{ext}', outputDir: './tests/test-results', - reporter: [ - [ - process.env.CI ? 'blob' : 'html', - { outputFolder: './tests/playwright-report' }, - ], - ], + reporter: [[process.env.CI ? 'blob' : 'html', { outputFolder: './tests/playwright-report' }]], timeout: 720 * 1000, use: { baseURL: 'http://localhost:3000', @@ -41,9 +36,9 @@ export default defineConfig({ //}, ], webServer: { - command: 'yarn start', + command: 'yarn test:e2e:serve', url: 'http://localhost:3000', reuseExistingServer: !process.env.CI, - timeout: 120 * 1000, + timeout: 240 * 1000, }, }); diff --git a/tests/utils/visitStudy.ts b/tests/utils/visitStudy.ts index f36fe2d99..25c9bd80d 100644 --- a/tests/utils/visitStudy.ts +++ b/tests/utils/visitStudy.ts @@ -6,15 +6,16 @@ import { Page } from '@playwright/test'; * @param title - The study instance UID of the study to visit * @param mode - The mode to visit the study in * @param delay - The delay to wait after visiting the study + * @param datasources - the data source to load the study from */ export async function visitStudy( page: Page, studyInstanceUID: string, mode: string, - delay: number = 0 + delay: number = 0, + datasources = 'ohif' ) { - await page.goto('/?resultsPerPage=100'); - await page.getByTestId('confirm-and-hide-button').click(); + await page.goto(`/?resultsPerPage=100&datasources=${datasources}`); await page.getByTestId(studyInstanceUID).click(); await page.getByRole('button', { name: mode }).click(); await page.waitForLoadState('domcontentloaded');