Skip to content

Commit 4fa2a87

Browse files
authored
removes docs for test configuration override (WordPress#49660)
1 parent 99d837a commit 4fa2a87

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

docs/contributors/code/e2e/README.md

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -114,45 +114,3 @@ test.describe( 'Grouping tests (@webkit, -chromium)', () => {
114114
} );
115115
} );
116116
```
117-
118-
## Local configuration of Playwright
119-
120-
Sometimes the deafults that Gutenberg offers for Playwright configuration need to be changed. While most configuration can be overriden by passing arguments to the test runner command line, we may want to make permanent confguration changes, such as setting the test to always run with `headless` mode set to `false` and you own custom slow motion value.
121-
122-
To do this one can create a file named `playwright.config.override.ts` file in the `/test/e2e/` folder. In this new file we need to import the exiting configuration, then use the new values on top to override the defaults.
123-
124-
For example:
125-
126-
```ts
127-
/**
128-
* External dependencies
129-
*/
130-
import { defineConfig } from '@playwright/test';
131-
/**
132-
* Internal dependencies
133-
*/
134-
import base from './playwright.config.ts';
135-
136-
const config = defineConfig( {
137-
...base,
138-
use: {
139-
...base.use,
140-
headless: true,
141-
launchOptions: {
142-
//slowMo: 500,
143-
},
144-
trace: 'off',
145-
screenshot: 'off',
146-
video: 'off',
147-
},
148-
} );
149-
150-
export default config;
151-
152-
```
153-
154-
After making this file you can now run your tests passing the new configuration file with the `--config` argument:
155-
156-
```bash
157-
npm run test:e2e:playwright -- --config=test/e2e/playwright.override.config.ts
158-
```

0 commit comments

Comments
 (0)