Skip to content
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

Merged
merged 3 commits into from
Apr 1, 2021

Conversation

kuceb
Copy link
Contributor

@kuceb kuceb commented Mar 29, 2021

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 event

Feat (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

  • Have tests been added/updated?
  • Has the original issue or this PR been tagged with a release in ZenHub?
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?
  • Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 29, 2021

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Mar 29, 2021



Test summary

9394 0 119 3Flakiness 1


Run details

Project cypress
Status Passed
Commit 3f4818e
Started Apr 1, 2021 10:45 PM
Ended Apr 1, 2021 10:56 PM
Duration 10:58 💡
OS Linux Debian - 10.5
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/retries.ui.spec.js Flakiness
1 runner/cypress retries.ui.spec > opens attempt on each attempt failure for the screenshot, and closes after test passes

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

@kuceb kuceb changed the title fear: change default headless size to 1920x1080 feat: change default headless size to 1920x1080 Mar 29, 2021
@kuceb kuceb requested a review from flotwig March 29, 2021 14:41
flotwig
flotwig previously approved these changes Mar 29, 2021
Copy link
Contributor

@flotwig flotwig left a 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

@jennifer-shehane
Copy link
Member

@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

@kuceb
Copy link
Contributor Author

kuceb commented Apr 1, 2021

@jennifer-shehane yes, this PR actually fixes that bug. I'll tag it as fixed

@kuceb kuceb force-pushed the increase-default-recording-size branch from 49a80d4 to 8dbb946 Compare April 1, 2021 20:48
@kuceb kuceb requested a review from a team as a code owner April 1, 2021 20:48
@kuceb kuceb changed the base branch from 7.0-release to develop April 1, 2021 20:48
@kuceb kuceb dismissed flotwig’s stale review April 1, 2021 20:48

The base branch was changed.

Copy link
Contributor

@flotwig flotwig left a 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()
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 5, 2021

Released in 7.0.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v7.0.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Apr 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants