mirror of
https://github.com/enso-org/enso.git
synced 2024-12-22 04:31:40 +03:00
36722eaf55
To guard us from flaky tests, CI will run every test three times and fail if _any_ of the run fails. This way we hope most flakiness will be catch before merging PR. Configured dashboard in the same way.
51 lines
1.7 KiB
TypeScript
51 lines
1.7 KiB
TypeScript
/** @file Playwright browser testing configuration. */
|
|
/** Note that running Playwright in CI poses a number of issues:
|
|
* - `backdrop-filter: blur` is disabled, due to issues with Chromium's `--disable-gpu` flag
|
|
* (see below).
|
|
* - System validation dialogs are not reliable between computers, as they may have different
|
|
* default fonts. */
|
|
import * as test from '@playwright/test'
|
|
|
|
/* eslint-disable @typescript-eslint/no-magic-numbers, @typescript-eslint/strict-boolean-expressions */
|
|
|
|
export default test.defineConfig({
|
|
testDir: './e2e',
|
|
fullyParallel: true,
|
|
forbidOnly: true,
|
|
workers: 1,
|
|
repeatEach: process.env.CI ? 3 : 1,
|
|
expect: {
|
|
toHaveScreenshot: { threshold: 0 },
|
|
timeout: 30_000,
|
|
},
|
|
use: {
|
|
baseURL: 'http://localhost:8080',
|
|
launchOptions: {
|
|
ignoreDefaultArgs: ['--headless'],
|
|
args: [
|
|
// Much closer to headful Chromium than classic headless.
|
|
'--headless=new',
|
|
// Required for `backdrop-filter: blur` to work.
|
|
'--use-angle=swiftshader',
|
|
// FIXME: `--disable-gpu` disables `backdrop-filter: blur`, which is not handled by
|
|
// the software (CPU) compositor. This SHOULD be fixed eventually, but this flag
|
|
// MUST stay as CI does not have a GPU.
|
|
'--disable-gpu',
|
|
// Fully disable GPU process.
|
|
'--disable-software-rasterizer',
|
|
// Disable text subpixel antialiasing.
|
|
'--font-render-hinting=none',
|
|
'--disable-skia-runtime-opts',
|
|
'--disable-system-font-check',
|
|
'--disable-font-subpixel-positioning',
|
|
'--disable-lcd-text',
|
|
],
|
|
},
|
|
},
|
|
webServer: {
|
|
command: 'npm run dev:e2e',
|
|
port: 8080,
|
|
reuseExistingServer: false,
|
|
},
|
|
})
|