The reference repo of a workshop for FETI about browser automation (both for E2E testing and for web scraping) with Puppeteer. Workshop level: basic. To attend the workshop you only need to know JS promises and async/await.
Important: if you are just looking for the code of the working tests, you'll find it on the develop
branch
The project requires Node.js 8+, launch
$ npm install
$ npm test
If you see something like this
PASS test/min.e2e.test.js
Generic check
✓ You're ready for the workshop :) (818ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 2.121s
it means that you're ready for the attending the workshop or to train by yourself with the tests I prepared.
- master: just the README and the isntallation instructions
- test-1 (code): write a test that passes if the main button takes the user to the linked page
- test-2: it's the same of test-1... but with a damper cookie footer to be accepted
- test-3: the cookie footer now disappear with a CSS animation
- test-4: the cookie footer trigger an event when it's hidden
- test-5-step1 (code): add a Todo in the Vue app and check that it's showed in page
- test-5-step2 (code): ad and remove some Todos and then check the state of the store of the Vue app
- test-6 (code): scrape the first 30 results of a given query directly by Google
Every test has a working solution in another branch
- test-1-solution (code)
- test-2-solution (code)
- test-3-solution (code)
- test-4-solution (code)
- test-5-step1-solution (code)
- test-5-step2-solution (code)
- test-6-solution (code)
- develop: here you can find all the tests and the solutions
- FETI for all the work they do
- Massimo Foti for inspiring me with his Unit Testing Workshop
- Kent C. Dodds for the amazing “Solidifying what you learn” post
- Luca Previtali and Creeo Studio that allowed me to try this workshop in advance