mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[7.2] [percy] define snapshot width to match current client wi… (#39649)
This commit is contained in:
parent
e2d5a3a407
commit
af8a93c683
1 changed files with 4 additions and 2 deletions
|
@ -46,7 +46,9 @@ export function takePercySnapshot() {
|
|||
}
|
||||
|
||||
// cache the dom snapshot containing the images
|
||||
const snapshot = agent.domSnapshot(document);
|
||||
const snapshot = agent.snapshot(document, {
|
||||
widths: [document.documentElement.clientWidth]
|
||||
});
|
||||
|
||||
// restore replaced canvases
|
||||
for (const { image, canvas } of replacements) {
|
||||
|
@ -59,5 +61,5 @@ export function takePercySnapshot() {
|
|||
export const takePercySnapshotWithAgent = `
|
||||
${readFileSync(agentJsFilename(), 'utf8')}
|
||||
|
||||
return (${takePercySnapshot.toString()})();
|
||||
return (${takePercySnapshot.toString()}).apply(null, arguments);
|
||||
`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue