lecture 7 of 200 completed

Checking what happened

A test that checks 'something is on screen' passes on a broken app. Check the value your user depends on.

What you'll learn

  • Why checking that something exists is usually too weak
  • How to assert the exact value a user depends on
  • How to tell a real check from a decorative one

Here is a test that looks fine and proves almost nothing.

Reading example. Lending Shelf is a fictional library app. You can read these examples here. Your exercises use a different app.

When you borrow a book in Lending Shelf, two things happen. A badge called "On loan" counts your books, and a short notice names the book you borrowed.

full course

Keep reading with the full course

The Foundations track and the first lessons in each framework are free. This lesson needs full course access. A course plan includes all lessons for Playwright, Cypress and Selenium.

See course plans →