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

Playwright viewport option improvements #2202

Open
nickofthyme opened this issue Oct 18, 2023 · 0 comments
Open

Playwright viewport option improvements #2202

nickofthyme opened this issue Oct 18, 2023 · 0 comments
Labels
:ci enhancement New feature or request

Comments

@nickofthyme
Copy link
Collaborator

nickofthyme commented Oct 18, 2023

Back when we migrated to playwright we adopted the old viewport size from puppeteer. This is fine, however we also added styles for .echVisualTesting particularly a padding of 200px for testing tooltip popper placement.

&.echVisualTesting {
&,
body,
#root {
background: blanchedalmond !important;
}
#story-header {
display: none;
}
#root {
padding-top: 200px;
padding-bottom: 200px;
}
}
}

Since we have this padding in place, any story that goes outside of the confines of the #story-root risks being clipped in the vrt screenshot.

I would suggest a better way of handling this, ideally we can simply maximize the viewport size and limit the screenshot to the .echChart that defaults to a certain size. But in this case anything that goes beyond the #story-root would still be captured correctly.

The key to this working without changing a ton of screenshots is to force the .echChart element size to be consistent no matter the size of the browser window.

@nickofthyme nickofthyme added enhancement New feature or request :ci labels Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ci enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant