Can I force the browser size to a percentage? #22739
Unanswered
jonmhayden
asked this question in
Questions and Help
Replies: 1 comment 1 reply
-
Hello 👋 i was able to reproduce the same issue with headless using electron after adding the below on as suggested here
the % value disappears would this help? 🔨 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I searched the documentation and found that you can change the view port size to a specific height and width. But that doesn't change the size percentage of the Electron browser in the runner. It turns out that the percentage matters for my test. My test drags a leaflet map to a specific place. When I wrote the test, the size in the runner displayed:
1000x660 (88%)
My test was working great and moving the map where I wanted it. And at some point I dragged the browser to make it larger and the tests started failing. I spent hours trying to figure out why this was happening. Then I noticed that the size now showed:
1000x660 (95%)
When I dragged the browser back to 88%, my tests started working again. Can I force it to always be 88%? Side note, if I do a cypress run so it's headless, the video playback shows:
1000x660 (79%)
So obviously, my test fails when I do it headless too because I made all the mouse movements when it was at 88%.
Any idea about what I can do to fix this? I'm not sure if it matters, but I'm using the cypress-real-events library to move my mouse and drag the map.
Thanks,
Jon
Beta Was this translation helpful? Give feedback.
All reactions