This version adds support for using dynamic targets. Pass a targets
option to the screenshot()
call and you can either limit the targets from .happo.js by name, or create a completely new target.
In this example we're using the chrome-xl
target from our .happo.js
config file, and a dynamic Firefox target:
await happoPlaywright.screenshot(page, title, {
component: 'Title',
variant: 'default',
targets: [
'chrome-xl',
{ name: 'firefox-small', browser: 'firefox', viewport: '400x800' },
],
});