Nov 26, 2021 Apoorv Tiwari Apoorv is a Ruby on Rails and React Developer.
Cypress gives us the ability to stop the test at a spot viacy.pause()
command.We can use this to stop the test before any action or assertion that is causingour tests to fail.But this command only works when we run Cypress in GUI mode and, it isignored when we run the tests in headless mode.
Before
Before version 8.6.0cy.pause()
was ignored if we runour tests via cypress run --headed --no-exit
command.
Now, if we run the above test via the cypress run --headed --no-exit
command,then we notice from the image below that our test has not paused.
After
From Cypress 8.6.0 cy.pause()
works the same with cypress open
and cypress run
command when --headed
and --no-exit
flags are passed to cypress run
.
Now when we run the above test via cypress run --headed --no-exit
commandthen we notice from the image that our test has paused.
To know more about this, check out thePR.