File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,18 +30,25 @@ The `RecipeSearch` component should display a list of recipes fetched from a rem
3030pnpm test
3131```
3232
33- #### 2. Implement tests at ` src/app/recipe/recipe-search.ng .spec.ts ` : Query DOM and check names are displayed.
33+ #### 2. Open ` src/app/recipe/recipe-search.integration .spec.ts `
3434
35- #### 3. Checkout the implementation if you went with the TDD approach:
35+ #### 3. Start implementing the test and call the ` renderComponent ` setup function
3636
37- ``` sh
38- pnpm cook checkout-impl
37+ ``` ts
38+ it (' ...' , async () => {
39+ await renderComponent ();
40+ })
3941```
4042
41- ### π΄ Cutleries
43+ #### 4. Query DOM and check names are displayed
4244
43- - [ π Render function docs] ( https://testing-library.com/docs/angular-testing-library/api#render )
44- - [ π Testing Library Queries docs β or how to choose the right query] ( https://testing-library.com/docs/queries/about/ )
45+ Cf. [ π Appendices] ( #-appendices )
46+
47+ #### 5. Checkout the implementation if you went with the TDD approach:
48+
49+ ``` sh
50+ pnpm cook checkout-impl
51+ ```
4552
4653## π― Goal #2 : Implement Recipe Search "isolated" test
4754
@@ -55,7 +62,9 @@ The `RecipeSearch` component should display a list of recipes fetched from a rem
5562pnpm test
5663```
5764
58- #### 2. Implement tests: Check that the ` recipes ` property is set correctly when the component is initialized.
65+ #### 2. Implement tests
66+
67+ Check that the ` recipes ` property is set correctly when the component is initialized.
5968
6069#### 3. Checkout the implementation if you went with the TDD approach:
6170
@@ -65,6 +74,10 @@ pnpm cook checkout-impl
6574
6675## π Appendices
6776
77+ ### Queries priority
78+
79+ - [ π Testing Library Queries docs β or how to choose the right query] ( https://testing-library.com/docs/queries/about/ )
80+
6881### Query headings with Testing Library
6982
7083``` ts
You canβt perform that action at this time.
0 commit comments