Skip to content

Commit 07164d3

Browse files
committed
Update docs
1 parent fdb0c13 commit 07164d3

File tree

1 file changed

+6
-26
lines changed

1 file changed

+6
-26
lines changed

tests/e2e/README.md

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,9 @@ E2E tests can be run locally or in GitHub Actions. Github Actions are already co
77
## Recent Improvements
88

99
### Retry Mechanism
10-
The E2E tests now include an intelligent retry mechanism that:
11-
- **First run**: Executes all tests normally
12-
- **Automatic retry**: If any tests fail, only the failed tests are retried using Playwright's `--last-failed` flag
13-
14-
### Improved Timeout Handling
15-
- **Increased timeouts**: UI interaction timeouts increased from 100ms to 10 seconds for better reliability
16-
- **Better error handling**: More robust page loading and element waiting strategies
17-
- **DevTools reliability**: Improved devtools page navigation and interaction
10+
The E2E tests use Playwright's built-in retry mechanism:
11+
- **Automatic retries**: Failed tests are automatically retried up to 2 times in CI
12+
- **Configurable**: Retries are enabled in CI (`retries: 2`) and disabled locally (`retries: 0`)
1813

1914
### Dynamic Matrix Generation
2015
- **L-1 Policy**: Tests automatically run against the latest WooCommerce version and the L-1 (previous major) version
@@ -229,14 +224,9 @@ You can use the locator functionality to help correctly determine the locator sy
229224

230225
When tests fail in CI, the retry mechanism automatically kicks in:
231226

232-
1. **First run**: All tests execute normally
233-
2. **If failures occur**: The system automatically retries only the failed tests
234-
3. **Retry logs**: Look for the message "Some tests failed, retrying only failed tests with --last-failed flag" in the logs
235-
4. **Final results**: The test run will show both the initial results and retry results
236-
237-
This approach helps distinguish between:
238-
- **Flaky tests**: Tests that fail occasionally but pass on retry
239-
- **Consistent failures**: Tests that fail both initially and on retry (indicating real issues)
227+
1. **Automatic retries**: Failed tests are automatically retried up to 2 times
228+
2. **Retry logs**: Look for retry attempts in the test output
229+
3. **Final results**: The test run will show the final result after all retry attempts
240230

241231
## Slack integration
242232

@@ -285,16 +275,6 @@ await page.getByRole( 'button', { name: /submit/i } ).click();
285275
286276
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.
287277

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-
298278
**What is the best way to target elements in the page?**
299279

300280
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

Comments
 (0)