diff --git a/core/src/utils/test/playwright/docs/best-practices.md b/core/src/utils/test/playwright/docs/best-practices.md index 79d79653de..d17cd250dd 100644 --- a/core/src/utils/test/playwright/docs/best-practices.md +++ b/core/src/utils/test/playwright/docs/best-practices.md @@ -18,6 +18,7 @@ This guide details best practices that should be followed when writing E2E tests - [Test for positive and negative cases](#practice-positive-negative) - [Start your test with the configuration or layout in place if possible](#practice-test-config) - [Place your test closest to the fix or feature](#practice-test-close) +- [Account for different locales when writing tests](#practice-locales)

Use the customized `test` function

@@ -259,3 +260,7 @@ This allows tests to remain fast on CI as we can focus on the test itself instea

Place your test closest to the fix or feature

Tests should be placed closest to where the fix or feature was implemented. This means that if a fix was written for `ion-button`, then the test should be placed in `src/components/button/tests`. + +

Account for different locales when writing tests

+ +Tests ran on CI may not run on the same locale as your local machine. It's always a good idea to apply locale considerations to components that support it, when writing tests (i.e. `ion-datetime` should specify `locale="en-US"`).