Update test timeout to 90 seconds, and suggest using `DEFAULT_TIMEOUT_OVERRIDE` in E2E README (#38288)

This commit is contained in:
nigeljamesstevenson 2023-05-15 20:12:39 +01:00 committed by GitHub
commit 06006619b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Update the E2E test timeout to 90 sec, and update the E2E README.

View File

@ -53,7 +53,12 @@ Other ways of running tests (make sure you are in the `plugins/woocommerce` fold
- `pnpm test:e2e-pw --headed` (headed -- displaying browser window and test interactions)
- `pnpm test:e2e-pw --debug` (runs tests in debug mode)
- `pnpm test:e2e-pw ./tests/e2e-pw/tests/activate-and-setup/basic-setup.spec.js` (runs a single test)
- `pnpm test:e2e-pw --ui` (open tests in [Playwright UI mode](https://playwright.dev/docs/test-ui-mode))
- `pnpm test:e2e-pw --ui` (open tests in [Playwright UI mode](https://playwright.dev/docs/test-ui-mode)). You may need to increase the [test timeout](https://playwright.dev/docs/api/class-testconfig#test-config-timeout) from the 90-second default, as tests might take longer to execute when ran through the Playwright UI. You may do this by setting the `DEFAULT_TIMEOUT_OVERRIDE` environment variable like so:
```bash
# Increase test timeout to 3 minutes
export DEFAULT_TIMEOUT_OVERRIDE=180000
pnpm test:e2e-pw --ui
```
To see all options, make sure you are in the `plugins/woocommerce` folder and run `pnpm playwright test --help`

View File

@ -11,7 +11,7 @@ const {
const config = {
timeout: DEFAULT_TIMEOUT_OVERRIDE
? Number( DEFAULT_TIMEOUT_OVERRIDE )
: 300 * 1000,
: 90 * 1000,
expect: { timeout: 20 * 1000 },
outputDir: './test-results/report',
globalSetup: require.resolve( './global-setup' ),