chore(create-playwright): have better config defaults (#9362)
This commit is contained in:
parent
fb001f608f
commit
8bfd63e4ba
|
|
@ -11,8 +11,8 @@ const config = {
|
||||||
timeout: 30 * 1000,
|
timeout: 30 * 1000,
|
||||||
// Test directory
|
// Test directory
|
||||||
testDir: path.join(__dirname, '{{testDir}}'),
|
testDir: path.join(__dirname, '{{testDir}}'),
|
||||||
// If a test fails, retry it additional 2 times
|
// If a test fails on CI, retry it additional 2 times
|
||||||
retries: 2,
|
retries: process.env.CI ? 2 : 0,
|
||||||
// Artifacts folder where screenshots, videos, and traces are stored.
|
// Artifacts folder where screenshots, videos, and traces are stored.
|
||||||
outputDir: 'test-results/',
|
outputDir: 'test-results/',
|
||||||
|
|
||||||
|
|
@ -26,7 +26,7 @@ const config = {
|
||||||
use: {
|
use: {
|
||||||
// Retry a test if its failing with enabled tracing. This allows you to analyse the DOM, console logs, network traffic etc.
|
// Retry a test if its failing with enabled tracing. This allows you to analyse the DOM, console logs, network traffic etc.
|
||||||
// More information: https://playwright.dev/docs/trace-viewer
|
// More information: https://playwright.dev/docs/trace-viewer
|
||||||
trace: 'retry-with-trace',
|
trace: 'on-first-retry',
|
||||||
|
|
||||||
// All available context options: https://playwright.dev/docs/api/class-browser#browser-new-context
|
// All available context options: https://playwright.dev/docs/api/class-browser#browser-new-context
|
||||||
contextOptions: {
|
contextOptions: {
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ const config: PlaywrightTestConfig = {
|
||||||
timeout: 30 * 1000,
|
timeout: 30 * 1000,
|
||||||
// Test directory
|
// Test directory
|
||||||
testDir: path.join(__dirname, '{{testDir}}'),
|
testDir: path.join(__dirname, '{{testDir}}'),
|
||||||
// If a test fails, retry it additional 2 times
|
// If a test fails on CI, retry it additional 2 times
|
||||||
retries: 2,
|
retries: process.env.CI ? 2 : 0,
|
||||||
// Artifacts folder where screenshots, videos, and traces are stored.
|
// Artifacts folder where screenshots, videos, and traces are stored.
|
||||||
outputDir: 'test-results/',
|
outputDir: 'test-results/',
|
||||||
|
|
||||||
|
|
@ -22,7 +22,7 @@ const config: PlaywrightTestConfig = {
|
||||||
use: {
|
use: {
|
||||||
// Retry a test if its failing with enabled tracing. This allows you to analyse the DOM, console logs, network traffic etc.
|
// Retry a test if its failing with enabled tracing. This allows you to analyse the DOM, console logs, network traffic etc.
|
||||||
// More information: https://playwright.dev/docs/trace-viewer
|
// More information: https://playwright.dev/docs/trace-viewer
|
||||||
trace: 'retry-with-trace',
|
trace: 'on-first-retry',
|
||||||
|
|
||||||
// All available context options: https://playwright.dev/docs/api/class-browser#browser-new-context
|
// All available context options: https://playwright.dev/docs/api/class-browser#browser-new-context
|
||||||
contextOptions: {
|
contextOptions: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue