forked from kevadesu/forgejo
Parallelize playwright tests
- allow running with multiple workers (tested with up to four workers locally which
didn't show signs of flakiness)
- prevent race condition with webauthn tests (running them in parallel
on the same user could prevent another test from logging in)
- fix flakiness on CI action status (Chromium sometimes needs a long
time to fill the href field, firefox is always faster)
This reverts commit e8585eff5c
.
This commit is contained in:
parent
83e9e9230a
commit
3695f5d096
3 changed files with 8 additions and 12 deletions
|
@ -11,18 +11,14 @@ export default {
|
|||
testDir: './tests/e2e/',
|
||||
testMatch: /.*\.test\.e2e\.js/, // Match any .test.e2e.js files
|
||||
|
||||
/**
|
||||
* Only run one test at a time, running multiple could lead to a inconsistent
|
||||
* database state.
|
||||
*/
|
||||
fullyParallel: false,
|
||||
workers: 1,
|
||||
// you can adjust this value locally to match your machine's power,
|
||||
// or pass `--workers x` to playwright
|
||||
workers: process.env.CI ? 1 : 2,
|
||||
|
||||
/* Maximum time one test can run for. */
|
||||
timeout: 30 * 1000,
|
||||
|
||||
expect: {
|
||||
|
||||
/**
|
||||
* Maximum time expect() should wait for the condition to be met.
|
||||
* For example in `await expect(locator).toHaveText();`
|
||||
|
@ -34,7 +30,7 @@ export default {
|
|||
forbidOnly: Boolean(process.env.CI),
|
||||
|
||||
/* Retry on CI only */
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
retries: process.env.CI ? 1 : 0,
|
||||
|
||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||
reporter: process.env.CI ? 'list' : [['list'], ['html', {outputFolder: 'tests/e2e/reports/', open: 'never'}]],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue