ohif-viewer/playwright.config.ts
Bill Wallace 09093b3f0a
Update to use beta 5.0 of CS3D (#5904)
* Update to use beta 5.0

* fix: unit tests

* fix: Allow slow server/test rendering to still work

* Update tests to use viewport grid compare

* Fix storage of stale retries actual/diff files

* cs3d linking fixees

* Linking for cs3d metadata

* Use metadata import for suv scaling

* Fix suv import

* Use type for import

* fix: Metadata registration ordering

* Use beta for upstream

* Merge from origin/master

* Revert tests to master

* Undo beta version changes

* Revert bun.lock file to that of master.

* Reduce test failure retries to one per test. Cap the number of failed total tests to 10. Replace the JSON reporter with the HTML reporter.

* Add generic provider back in

* Deprecate OHIF versions of cs3d utils

* fix

* Undo some cs3d beta dependencies so this PR could be merged

* Build fix

* Fixing build issues

* build issue

* bun lock

* Temporary cache clear to resolve build issue

* Cache bust

* Remove the babel hoist fix attempt

* Cache netlify toml issue

* Fix netlify cache issue

* Try to fix cache dependency issue

* Try update resolutions

* babel hoist fix

* fix: Remove netlify cache bust

* Revert pinned versions

* PR comments on duplicated suv-factors

* Undo lock changes and isEqual add

---------

Co-authored-by: Joe Boccanfuso <joe.boccanfuso@radicalimaging.com>
Co-authored-by: Alireza <ar.sedghi@gmail.com>
2026-05-19 21:41:37 -04:00

54 lines
1.6 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests',
fullyParallel: !!process.env.CI,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
maxFailures: process.env.CI ? 10 : undefined,
workers: process.env.CI ? 6 : undefined,
snapshotPathTemplate: './tests/screenshots{/projectName}/{testFilePath}/{arg}{ext}',
outputDir: './tests/test-results',
reporter: [
['html', { outputFolder: './tests/playwright-report' }],
],
globalTimeout: 800_000,
timeout: 800_000,
use: {
baseURL: 'http://localhost:3335',
trace: 'on-first-retry',
video: 'on-first-retry',
testIdAttribute: 'data-cy',
actionTimeout: 10_000,
launchOptions: {
// do not hide the scrollbars so that we can assert their look-and-feel
ignoreDefaultArgs: ['--hide-scrollbars'],
},
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], deviceScaleFactor: 1 },
},
// TODO: Fix firefox tests
// {
// name: 'firefox',
// use: { ...devices['Desktop Firefox'], deviceScaleFactor: 1 },
// },
// This is commented out until SharedArrayBuffer is enabled in WebKit
// See: https://github.com/microsoft/playwright/issues/14043
//{
// name: 'webkit',
// use: { ...devices['Desktop Safari'], deviceScaleFactor: 1 },
//},
],
webServer: {
command: 'cross-env APP_CONFIG=config/e2e.js COVERAGE=true OHIF_PORT=3335 nyc yarn start',
url: 'http://localhost:3335',
reuseExistingServer: !process.env.CI,
timeout: 360_000,
},
});