Closed liza-mae closed 5 years ago
Pinging @elastic/kibana-operations
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...
Width and height
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.
Do you think we should just automatically pass the current width of the browser to percy? cc @nreese
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.
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)
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