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
This best practice currently resides in our internal testing process
docs. I think this is valuable information for contributors to have as
well, so I've added it to our public best practices doc.
Copy file name to clipboardExpand all lines: core/src/utils/test/playwright/docs/best-practices.md
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ This guide details best practices that should be followed when writing E2E tests
18
18
-[Test for positive and negative cases](#practice-positive-negative)
19
19
-[Start your test with the configuration or layout in place if possible](#practice-test-config)
20
20
-[Place your test closest to the fix or feature](#practice-test-close)
21
+
-[Account for different locales when writing tests](#practice-locales)
21
22
22
23
<h2id="practice-test">Use the customized `test` function</h2>
23
24
@@ -259,3 +260,7 @@ This allows tests to remain fast on CI as we can focus on the test itself instea
259
260
<h2 id="practice-test-close">Place your test closest to the fix or feature</h2>
260
261
261
262
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`.
263
+
264
+
<h2 id="practice-locales">Account for different locales when writing tests</h2>
265
+
266
+
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"`).
0 commit comments