You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge branch 'dev/woopmnt-5249-e2e-ensure-version-coverage-for-woocommerce-and-php' into dev/woopmnt-5251-e2e-investigate-and-re-enable-woocommerce-blocks-e2e-tests
Copy file name to clipboardExpand all lines: tests/e2e/README.md
-20Lines changed: 0 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,12 +11,6 @@ The E2E tests use Playwright's built-in retry mechanism:
11
11
-**Automatic retries**: Failed tests are automatically retried up to 2 times in CI
12
12
-**Configurable**: Retries are enabled in CI (`retries: 2`) and disabled locally (`retries: 0`)
13
13
14
-
15
-
### Improved Timeout Handling
16
-
-**Increased timeouts**: UI interaction timeouts increased from 100ms to 10 seconds for better reliability
17
-
-**Better error handling**: More robust page loading and element waiting strategies
18
-
-**DevTools reliability**: Improved devtools page navigation and interaction
19
-
20
14
### Dynamic Matrix Generation
21
15
-**L-1 Policy**: Tests automatically run against the latest WooCommerce version and the L-1 (previous major) version
22
16
-**Dynamic version resolution**: Automatically fetches latest WC, RC, and beta versions from WordPress.org API
@@ -234,10 +228,6 @@ When tests fail in CI, Playwright's built-in retry mechanism automatically handl
234
228
2.**Retry logs**: Look for retry attempts in the test output
235
229
3.**Final results**: The test run will show the final result after all retry attempts
236
230
237
-
This approach helps distinguish between:
238
-
-**Flaky tests**: Tests that fail occasionally but pass on retry
239
-
-**Consistent failures**: Tests that fail all retry attempts (indicating real issues)
240
-
241
231
## Slack integration
242
232
243
233
The Slack reporter is a custom reporter that sends e2e test failures to a public Slack channel (search Slack channel ID `CQ0Q6N62D`). The reporter is configured to only send the first failure of a test to Slack. If the retry also fails it will not be sent to prevent spamming the channel.
In some cases, you may need to wait for the page to reach a certain load state before interacting with it. You can use `await page.waitForLoadState( 'domcontentloaded' );` to wait for the page to finish loading.
287
277
288
-
**What timeout values are used for UI interactions?**
289
-
290
-
The E2E tests use optimized timeout values for better reliability:
291
-
- **Global expect timeout**: 20 seconds (configured in `playwright.config.ts`)
292
-
- **UI interaction timeouts**: 10 seconds for critical UI elements (buttons, forms, etc.)
293
-
- **Page load timeouts**: 120 seconds for test execution
294
-
- **Network idle waits**: Used for dynamic content loading
295
-
296
-
These timeouts have been increased from the previous 100ms values to provide better stability, especially for slower environments or complex UI interactions.
297
-
298
278
**What is the best way to target elements in the page?**
299
279
300
280
Prefer the use of [user-facing attribute or test-id locators](https://playwright.dev/docs/locators#locating-elements) to target elements in the page. This will make the tests more resilient to changes to implementation details, such as class names.
0 commit comments