Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Tests run against e2e config for both playwright and older tests #4283

Merged
merged 2 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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,
},
});
7 changes: 4 additions & 3 deletions tests/utils/visitStudy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down