Skip to the editor

Assert the wrong-password error

Forms & validation · level 1 of 5 · Nimbus

Testing the sad path means asserting the app pushed back, not just that nothing crashed.

The problem

The test signs in with the wrong password. Add the assertion that proves the app shows the error message.

Nimbus login: demo@nimbus.app / secure123 is valid. The test uses a wrong password on purpose.

Fill in the missing assertion

The test is set up but proves nothing yet. Add the assertion where the TODO is.

Done when

  • A wrong password shows the 'Invalid email or password' error.

Bugs we plant

  • Wrong credentials show no error message

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

Loading the editor…