Skip to the editor

Checkout must reject a bad card

Forms & validation · level 3 of 5 · Terra Supply

The happy path proves an order can be placed. Only the unhappy path proves the wrong order cannot be.

The problem

Go through Terra Supply checkout with an invalid card number (1234) and prove the order is refused.

Fill in the other fields correctly, name, email and address, so the card is the only thing wrong.

A checkout test that only ever pays with a valid card cannot tell working validation from none at all.

Done when

  • An invalid card number blocks the order and shows a card error.

Bugs we plant

  • Checkout accepts an invalid card number

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

Loading the editor…