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
Copy file name to clipboardExpand all lines: readme-fr.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -959,23 +959,21 @@ it("When updating site name, get successful confirmation", async () => {
959
959
960
960
<br/><br/>
961
961
962
-
# Section 3️⃣: Frontend Testing
962
+
# Section 3️⃣: Tests Frontend
963
963
964
-
## ⚪ ️ 3.1 Separate UI from functionality
965
-
966
-
:white_check_mark:**Do:** When focusing on testing component logic, UI details become a noise that should be extracted, so your tests can focus on pure data. Practically, extract the desired data from the markup in an abstract way that is not too coupled to the graphic implementation, assert only on pure data (vs HTML/CSS graphic details) and disable animations that slow down. You might get tempted to avoid rendering and test only the back part of the UI (e.g. services, actions, store) but this will result in fictional tests that don't resemble the reality and won't reveal cases where the right data doesn't even arrive in the UI
964
+
## ⚪ ️ 3.1 Separer l'UI des fonctionnalités
967
965
966
+
:white_check_mark:**À faire:** Lorsqu'on veux tester la logique d'un composant, les détail UI deviennent du bruit qui devrait être extrait, afin que les tests se concentrent purement sur les données. En pratique, extrait les donnée désirés du markup d'un facon abstrait qui n'est pas torop complée avec l'iplémentation graphique, assert seulement les donnée (vs des détails graphiques HTML/CSS) et désactive les animations qui ralentissent. Tu peux être tenté d'éviter le rendu et ne tester que les parties derrière l'UI (e.g. services, actions, store) mais ils s'agira de tests fictionnels qui ne ressemblent pas à la réalité et ne révèleront pas les cas ou la bonne donnée n'arrive pas à l'UI.
968
967
<br/>
969
968
970
-
❌ **Otherwise:** The pure calculated data of your test might be ready in 10ms, but then the whole test will last 500ms (100 tests = 1 min) due to some fancy and irrelevant animation
971
-
969
+
❌ **Autrement:** Les donnée calculée de ton tests peuvent être prêtes en 10ms, mais l'ensemble du tests durera 500ms (100 tests = 1 min) à cause d'animation qui ne nous concerne pas dans le cadre du test.
<details><summary>✏ <b>Exemple de code</b></summary>
975
973
976
974
<br/>
977
975
978
-
### :clap:Doing It Right Example: Separating out the UI details
976
+
### :clap:Bien faire les choses, exemple: Séparer les détails UI
979
977
980
978

981
979
@@ -996,7 +994,7 @@ test("When users-list is flagged to show only VIP, should display only VIP membe
996
994
997
995
<br/>
998
996
999
-
### :thumbsdown:Anti-Pattern Example: Assertion mix UI details and data
997
+
### :thumbsdown:Exemple d'anti pattern: L'assertion mélange des détails UX et les données
1000
998
1001
999
```javascript
1002
1000
test("When flagging to show only VIP, should display only VIP members", () => {
0 commit comments