-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: watch mode improvements (#7326)
- Loading branch information
1 parent
2e03bc3
commit 5af4913
Showing
3 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* eslint-disable no-undef */ | ||
// playwright.config.js | ||
// @ts-check | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
const { devices } = require('@playwright/test'); | ||
const MAX_FAILURES = 5; | ||
const NUM_WORKERS = 2; | ||
|
||
/** @type {import('@playwright/test').PlaywrightTestConfig} */ | ||
const config = { | ||
retries: 0, //Retries 2 times for a total of 3 runs. When running sharded and with max-failures=5, this should ensure that flake is managed without failing the full suite | ||
testDir: 'tests', | ||
timeout: 60 * 1000, | ||
webServer: { | ||
command: 'npm run start', //Start in dev mode for hot reloading | ||
url: 'http://localhost:8080/#', | ||
timeout: 200 * 1000, | ||
reuseExistingServer: true //This was originally disabled to prevent differences in local debugging vs. CI. However, it significantly speeds up local debugging. | ||
}, | ||
maxFailures: MAX_FAILURES, //Limits failures to 5 to reduce CI Waste | ||
workers: NUM_WORKERS, //Limit to 2 for CircleCI Agent | ||
use: { | ||
baseURL: 'http://localhost:8080/', | ||
headless: true, | ||
ignoreHTTPSErrors: true, | ||
screenshot: 'only-on-failure', | ||
trace: 'on-first-retry', | ||
video: 'off' | ||
}, | ||
projects: [ | ||
{ | ||
name: 'chrome', | ||
testMatch: '**/*.spec.js', // run all tests | ||
use: { | ||
browserName: 'chromium' | ||
} | ||
} | ||
], | ||
reporter: [ | ||
['list'], | ||
[ | ||
'html', | ||
{ | ||
open: 'never', | ||
outputFolder: '../html-test-results' //Must be in different location due to https://github.com/microsoft/playwright/issues/12840 | ||
} | ||
], | ||
['junit', { outputFile: '../test-results/results.xml' }], | ||
['@deploysentinel/playwright'] | ||
] | ||
}; | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters