feat(challenge28): testing a simple checkbox

This commit is contained in:
ThomasL
2023-07-05 14:33:35 +02:00
parent 4ad02e12ad
commit 9534fdcd24
18 changed files with 326 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
<h1>Test of a simple checkbox</h1>
> Author: Thomas Laforge
### Information
This is the perfect example to get started with `Testing Library`.
You will need to only check if the button gets enabled when clicking on the checkbox
You can look into debug function to get full power of `Testing Library` like:
- logRoles(...);
- screen.debug(); // you can pass a element as input
- screen.logTestingPlaygroundURL(); // you can pass a element as input
### Submitting your work
1. Fork the project
2. clone it
3. npm ci
4. `npx nx serve testing-checkbox`
5. _...work on it_
6. Commit your work
7. Submit a PR with a title beginning with **Answer:28** that I will review and other dev can review.
<a href="https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A28+label%3Aanswer"><img src="https://img.shields.io/badge/-Solutions-green" alt="testing-checkbox"/></a>
<a href='https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A28+label%3A"answer+author"'><img src="https://img.shields.io/badge/-Author solution-important" alt="testing-checkbox solution author"/></a>
<!-- <a href="{Blog post url}" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/-Blog post explanation-blue" alt="testing-checkbox blog article"/></a> -->
_You can ask any question on_ <a href="https://twitter.com/laforge_toma" target="_blank" rel="noopener noreferrer"><img src="./../../logo/twitter.svg" height=20px alt="twitter"/></a>