lecture 2 of 150 completed

Watching what the app sends

Some bugs never show on the screen. cy.intercept lets you watch the real request and check what was sent.

What you'll learn

  • Why some bugs never appear on screen
  • How to watch a real request and check what was sent
  • When to check the network instead of the page

cy.intercept is one of the most used commands in real Cypress work, and it is a main reason teams pick Cypress for apps with a busy API. You cannot run it in the editor on this site, because our browser engine does not implement request interception. Everything below is real, working Cypress. Use it on a local project and it behaves exactly as described.

Here is a bug that a normal test will never catch.

You create a contact named Dana Fox at the company FoxLabs. The green message appears. The new row appears in the table. Everything looks correct.

members only

Keep reading with the full course

The Foundations track and the first 5 lectures of each framework are free. This lecture is part of the paid course, which unlocks every lecture, all three frameworks, and downloads.

See the options →