Introduction
Assertions check if the app works as we expect. They help catch mistakes early by comparing actual results to what should happen.
When you want to confirm a button is visible before clicking it.
When you need to check if a form shows an error message after wrong input.
When verifying that a page loads the correct title.
When ensuring a list contains the expected number of items.
When confirming a user is redirected to the right page after login.