Skip to the editor

Fix the wrong expected count

State across pages · level 1 of 5 · Terra Supply

A red test is not always a bug in the app. Read what the test claims, sometimes the claim is wrong.

The problem

Add one product, and the cart badge should read 1. This test expects 2 and fails.

Fix the expected value so the test passes, without removing the assertion.

Fix the failing test

This test is red right now. Run it to see how it fails, then edit until it passes, without weakening what it checks.

Done when

  • After adding one product, the badge reads 1.

Bugs we plant

  • Cart badge always shows 0

We break each one in a copy of the app. Your fixed test has to fail on every copy.

Loading the editor…