Skip to content

Commit 070ad03

Browse files
committed
docs: πŸ“ update recipe search instructions and test implementation steps
1 parent 2608e28 commit 070ad03

1 file changed

Lines changed: 21 additions & 8 deletions

File tree

β€Ždocs/instructions/1-recipe-search.mdβ€Ž

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,25 @@ The `RecipeSearch` component should display a list of recipes fetched from a rem
3030
pnpm 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
5562
pnpm 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

0 commit comments

Comments
Β (0)