elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.76k stars 8.15k forks source link

Add options to FTR for percy #39628

Closed liza-mae closed 5 years ago

liza-mae commented 5 years ago

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: elastic/kibana#33817

elasticmachine commented 5 years ago

Pinging @elastic/kibana-operations

spalger commented 5 years ago

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 commented 5 years ago

Width and height

spalger commented 5 years ago

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 commented 5 years ago

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

nreese commented 5 years ago

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 commented 5 years ago

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)