mirror of
https://github.com/hcengineering/platform.git
synced 2025-03-24 08:37:05 +00:00
47 lines
965 B
TypeScript
47 lines
965 B
TypeScript
![]() |
import { devices, PlaywrightTestConfig } from '@playwright/test'
|
||
|
import { config as dotenvConfig } from 'dotenv'
|
||
|
dotenvConfig()
|
||
|
|
||
|
let maxFailures: number | undefined
|
||
|
if (process.env.TESTS_MAX_FAILURES !== undefined) {
|
||
|
maxFailures = parseInt(process.env.TESTS_MAX_FAILURES)
|
||
|
}
|
||
|
|
||
|
const config: PlaywrightTestConfig = {
|
||
|
projects: [
|
||
|
{
|
||
|
name: 'QMS',
|
||
|
use: {
|
||
|
permissions: ['clipboard-read', 'clipboard-write'],
|
||
|
...devices['Desktop Chrome'],
|
||
|
screenshot: 'only-on-failure',
|
||
|
viewport: {
|
||
|
width: 1440,
|
||
|
height: 900
|
||
|
},
|
||
|
trace: {
|
||
|
mode: 'retain-on-failure',
|
||
|
snapshots: true,
|
||
|
screenshots: true,
|
||
|
sources: true
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
retries: 1,
|
||
|
timeout: 60000,
|
||
|
maxFailures,
|
||
|
reporter: [
|
||
|
['list'],
|
||
|
['html'],
|
||
|
[
|
||
|
'allure-playwright',
|
||
|
{
|
||
|
detail: false,
|
||
|
suiteTitle: false
|
||
|
}
|
||
|
]
|
||
|
]
|
||
|
}
|
||
|
export default config
|