From 80946becf9fc6bad5d34db6ff1f7bc6457ec5ff5 Mon Sep 17 00:00:00 2001 From: Sven Brodny Date: Mon, 4 Mar 2024 00:35:23 +0100 Subject: [PATCH 1/2] docs(testing-harness): update content --- .../content/docs/challenges/testing/23-harness.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/src/content/docs/challenges/testing/23-harness.md b/docs/src/content/docs/challenges/testing/23-harness.md index 5ea9834..e098b22 100644 --- a/docs/src/content/docs/challenges/testing/23-harness.md +++ b/docs/src/content/docs/challenges/testing/23-harness.md @@ -8,13 +8,17 @@ sidebar: order: 9 --- -## Statement: +## Information + +A component harness is a class that lets a test interact with a component via a supported API. The objective of this challenge is to have a better understanding of the CDK test harness API. In this initial challenge, we will only use Angular Material's built-in harnesses. -The goal is to test the functionality of `child.component.ts`. I have prepared a test suite that you need to implement, but feel free to include additional tests as well. - -**Note:** You are welcome to use Testing Library if you wish. - Documentation for CDK Component Harness is [here](https://material.angular.io/cdk/test-harnesses/overview#api-for-test-authors). Documentation for Angular Material component is [here](https://material.angular.io/components/button/overview). + +## Statement + +The goal is to test the functionality of `child.component.ts`, which consists of some inputs & checkboxes related to a `mat-slider`. I have prepared a test suite that you need to implement, but feel free to include additional tests as well. + +**Note:** You are welcome to use Testing Library if you wish. From 17330a0da067d08b8e0d54b03d68a46be478835d Mon Sep 17 00:00:00 2001 From: Sven Brodny Date: Mon, 4 Mar 2024 09:39:36 +0100 Subject: [PATCH 2/2] docs(testing-harness): update content (2) --- docs/src/content/docs/challenges/testing/19-input-output.md | 2 +- docs/src/content/docs/challenges/testing/20-modal.md | 2 +- docs/src/content/docs/challenges/testing/23-harness.md | 2 +- docs/src/content/docs/challenges/testing/29-real-application.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/content/docs/challenges/testing/19-input-output.md b/docs/src/content/docs/challenges/testing/19-input-output.md index 56456d4..6468c6c 100644 --- a/docs/src/content/docs/challenges/testing/19-input-output.md +++ b/docs/src/content/docs/challenges/testing/19-input-output.md @@ -8,7 +8,7 @@ sidebar: order: 110 --- -## Information: +## Information We have a small counter application that increments or decrements a number. The `CounterComponent` takes an initial value as an `@Input` and emits the result of the counter as an `@Output` when we click on the **Send** button. Since we are testing our component as a black box, we only have access to our inputs and listen to the output values. We should not rely on any internal implementation details!!! diff --git a/docs/src/content/docs/challenges/testing/20-modal.md b/docs/src/content/docs/challenges/testing/20-modal.md index c3d7c3f..93f32c2 100644 --- a/docs/src/content/docs/challenges/testing/20-modal.md +++ b/docs/src/content/docs/challenges/testing/20-modal.md @@ -8,7 +8,7 @@ sidebar: order: 111 --- -## Information: +## Information In this small application, you have an input prompting you to enter a name, and a **Confirm** button to submit your form. If you enter a name, a confirmation modal will appear; otherwise an error modal will be displayed. diff --git a/docs/src/content/docs/challenges/testing/23-harness.md b/docs/src/content/docs/challenges/testing/23-harness.md index e098b22..bdb9ce3 100644 --- a/docs/src/content/docs/challenges/testing/23-harness.md +++ b/docs/src/content/docs/challenges/testing/23-harness.md @@ -19,6 +19,6 @@ Documentation for Angular Material component is [here](https://material.angular. ## Statement -The goal is to test the functionality of `child.component.ts`, which consists of some inputs & checkboxes related to a `mat-slider`. I have prepared a test suite that you need to implement, but feel free to include additional tests as well. +Test the functionality of `child.component.ts`, which consists of some inputs & checkboxes related to a `mat-slider`. Implement the prepared test suite, but feel free to include additional tests as well. **Note:** You are welcome to use Testing Library if you wish. diff --git a/docs/src/content/docs/challenges/testing/29-real-application.md b/docs/src/content/docs/challenges/testing/29-real-application.md index 1d64fb9..e05edd7 100644 --- a/docs/src/content/docs/challenges/testing/29-real-application.md +++ b/docs/src/content/docs/challenges/testing/29-real-application.md @@ -8,7 +8,7 @@ sidebar: order: 205 --- -## Information: +## Information This application presents a greater challenge because it closely resembles a real-life application that you might encounter in your day-to-day activities as an Angular developer. What makes it more difficult is the need to handle asynchronous tasks and create appropriate mocks.