Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cypress fails tests randomly in headless mode but all passes all tests in real browse

I use Cypress 9.5 to test application in Angular 13. As a backend I have local server in PHP.

I have bunch of tests. When I run them in browser they all pass several times. When I run in headless mode they fail quite randomly. In both cases I use built-in electron browser.

In my tests I have log in as command using cy.request and storing required user data in sessionStorage. Then when I want to visit main page - login dialog appears.

How can I debug this to find a root cause?

Hint: watching videos from tests I can observe big lags in refreshing rendered image comparing to real browser.

like image 238
koral Avatar asked Sep 15 '25 08:09

koral


1 Answers

We had a similar issue, and after disabled the video, the ghost is gone.

like image 166
lazurey Avatar answered Sep 18 '25 10:09

lazurey