Understanding the instrument panel
The instrument panel is a special panel in the Cypress Test Runner that is only visible when Cypress is providing you with additional information about your tests. The appearance of the instrument panel is triggered by specific commands that provide more information about the tests. The commands that trigger the instrument panel include cy.stub()
, cy.intercept()
, and cy.spy()
. In this section, we will explore how we can use the instrument panel to display additional information about tests.
To achieve our goal of understanding how the instrument panel works, we will have to understand how intercepts, stubs, and spies work, along with what specific information is displayed on the instrument panel when stubs, routes, and spies are called in Cypress tests.
Intercepts
Cypress uses the cy.intercept()
command to manage the behavior of HTTP requests in the network layer of a test. To understand intercepts, we first need to understand how network...