Goal 5: Testing the frontend
Where we are now
The todo app works. Ticking a box saves it, crosses the item out and moves it to the bottom of the list. The arrows open and close the descriptions. But the only way to know all this still works is to click around by hand, every time we change something.
User story
As a developer, when I change the code, I can run one command and find out if ticking items and opening descriptions still work.
Technically speaking
Our features happen in the browser. HTMX swaps the list, and Alpine shows and hides descriptions. To test them, we need a real browser that loads the page, runs the JavaScript, clicks things and checks what changed. We’ll use Playwright to drive the browser from our pytest tests.