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

Add options to FTR for percy #39628

Closed
liza-mae opened this issue Jun 25, 2019 · 7 comments · Fixed by #39631
Closed

Add options to FTR for percy #39628

liza-mae opened this issue Jun 25, 2019 · 7 comments · Fixed by #39631

Comments

@liza-mae
Copy link
Contributor

We need a way to configure Percy snapshots through FTR. We have two ways some global options and per test. See: https://docs.percy.io/docs/build-your-own-sdk

Relates to: #33817

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations

@spalger
Copy link
Contributor

spalger commented Jun 25, 2019

What kind of options do you have in mind? I think it makes sense to use the PERCY_TOKEN environment variable, but I can't think of any other options we'd need...

@liza-mae
Copy link
Contributor Author

Width and height

@spalger
Copy link
Contributor

spalger commented Jun 25, 2019

Do you think it'd be fine if we limited it to one width, since we're capturing the canvas elements as PNG data we would need to resize the browser between multiple snapshot calls to support multiple widths.

@spalger
Copy link
Contributor

spalger commented Jun 25, 2019

Do you think we should just automatically pass the current width of the browser to percy? cc @nreese

@nreese
Copy link
Contributor

nreese commented Jun 25, 2019

I think functional tests will want to set browser width. One example, visual regression testing for client view port sizes and testing hand-held devices and laptop size screens to ensure elements flow as expected.

@spalger
Copy link
Contributor

spalger commented Jun 25, 2019

Yeah, and I think it would only make sense for our current dependency on converting <canvas> elements to <img> elements that we use the browser.setWindowSize() to change it, take the snapshot, and the snapshot that's taken correlates to that single size (rather than being auto-scaled by percy to multiple sizes). If we were only relying on css selectors to determine our sizing then a single dom snapshot could be re-rendered in multiple widths, but that's not the case (canvas/svg layouts require JS layout engines and are pretty prevalent)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants