-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: change default headless size to 1920x1080 #15686
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, good job normalizing all of these... puts us in a good spot to make this configurable later on too
@bkucera I'd like some guidance after this goes in on whether these docs overrides are still appropriately documented - for how to override. I know some people have said they are completely unable in updating the Electron size within CI with our documented way. https://docs.cypress.io/api/plugins/browser-launch-api#Set-screen-size-when-running-headless |
@jennifer-shehane yes, this PR actually fixes that bug. I'll tag it as fixed |
49a80d4
to
8dbb946
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a mastapiece
win.setSize(options.width, options.height) | ||
} else { | ||
// we maximize in headed mode, this is consistent with chrome+firefox headed | ||
win.maximize() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should only do this in run mode. In interactive mode, it's annoying to have electron maximize when it launches instead of being restored to its previous size and position.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chrome launches maximized and I haven't heard many complaints about that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the first time you open it? If you close Cypress-launched Chrome and then open it again, it restores itself to the last size and position in which you used it. We manually store the Electron size and position, so that we can do the same, but this was making it maximize every time instead of being restored to the last used size and position.
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
BREAKING_CHANGE: changes default browser resolution from 1280x720 to 1920x1080, which may cause fullPage screenshots and video recordings to change size without configuration changes
User facing changelog
Bug fix: Electron and Firefox now respect screen resolution preferences set by the
before:browser:launch
eventFeat (BREAKING_CHANGE): Screen size for headless browsers is now a 1920x1080 by default making full page screenshots and videos resolutions consistent. To take advantage of this and ensure more consistent screenshot/video sizes, use the
--headless
flag when also specifying--browser
Additional details
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?