mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 06:02:57 +03:00
chore: create-playwright config nits & test-runner intro docs (#10253)
This commit is contained in:
parent
ff0da94d6a
commit
24cfcf867e
@ -81,7 +81,8 @@ const { devices } = require('@playwright/test');
|
||||
|
||||
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
||||
const config = {
|
||||
retries: 2,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
use: {
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
@ -109,7 +110,8 @@ module.exports = config;
|
||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
|
||||
|
||||
const config: PlaywrightTestConfig = {
|
||||
retries: 2,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
use: {
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
|
@ -8,8 +8,9 @@ const path = require('path');
|
||||
*/
|
||||
const config = {
|
||||
testDir: path.join(__dirname, '{{testDir}}'), /* Test directory */
|
||||
forbidOnly: !!process.env.CI, /* Whether to exit with an error if any tests or groups are marked as test.only() or test.describe.only(). Useful on CI. */
|
||||
retries: process.env.CI ? 2 : 0, /* If a test fails on CI, retry it additional 2 times */
|
||||
// timeout: 30 * 1000, /* Timeout per test */
|
||||
// retries: process.env.CI ? 2 : 0, /* If a test fails on CI, retry it additional 2 times */
|
||||
// outputDir: 'test-results/', /* Artifacts folder where screenshots, videos, and traces are stored. */
|
||||
|
||||
// webServer: { /* Run your local dev server before starting the tests: */
|
||||
@ -19,9 +20,9 @@ const config = {
|
||||
|
||||
use: {
|
||||
trace: 'on-first-retry', /* Retry a test if its failing with enabled tracing. This allows you to analyse the DOM, console logs, network traffic etc. */
|
||||
contextOptions: { /* All available context options: https://playwright.dev/docs/api/class-browser#browser-new-context */
|
||||
ignoreHTTPSErrors: true,
|
||||
},
|
||||
// contextOptions: { /* All available context options: https://playwright.dev/docs/api/class-browser#browser-new-context */
|
||||
// ignoreHTTPSErrors: true,
|
||||
// },
|
||||
},
|
||||
|
||||
projects: [
|
||||
|
@ -4,8 +4,9 @@ import path from 'path';
|
||||
// Reference: https://playwright.dev/docs/test-configuration
|
||||
const config: PlaywrightTestConfig = {
|
||||
testDir: path.join(__dirname, '{{testDir}}'), /* Test directory */
|
||||
forbidOnly: !!process.env.CI, /* Whether to exit with an error if any tests or groups are marked as test.only() or test.describe.only(). Useful on CI. */
|
||||
retries: process.env.CI ? 2 : 0, /* If a test fails on CI, retry it additional 2 times */
|
||||
// timeout: 30 * 1000, /* Timeout per test */
|
||||
// retries: process.env.CI ? 2 : 0, /* If a test fails on CI, retry it additional 2 times */
|
||||
// outputDir: 'test-results/', /* Artifacts folder where screenshots, videos, and traces are stored. */
|
||||
|
||||
// webServer: { /* Run your local dev server before starting the tests: */
|
||||
@ -15,9 +16,9 @@ const config: PlaywrightTestConfig = {
|
||||
|
||||
use: {
|
||||
trace: 'on-first-retry', /* Retry a test if its failing with enabled tracing (analyse the DOM, console logs, network traffic): https://playwright.dev/docs/trace-viewer */
|
||||
contextOptions: { /* All available context options: https://playwright.dev/docs/api/class-browser#browser-new-context */
|
||||
ignoreHTTPSErrors: true,
|
||||
},
|
||||
// contextOptions: { /* All available context options: https://playwright.dev/docs/api/class-browser#browser-new-context */
|
||||
// ignoreHTTPSErrors: true,
|
||||
// },
|
||||
},
|
||||
|
||||
projects: [
|
||||
|
Loading…
Reference in New Issue
Block a user