Skip to content

Commit

Permalink
Restore <canvas> → <img> freezer
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrozenberg committed Sep 3, 2021
1 parent 7ceacc9 commit 44c60a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build-system/tasks/visual-diff/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ const REMOVE_AMP_SCRIPTS_SNIPPET = fs.readFileSync(
path.resolve(__dirname, 'snippets/remove-amp-scripts.js'),
'utf8'
);
const FREEZE_CANVAS_IMAGE_SNIPPET = fs.readFileSync(
path.resolve(__dirname, 'snippets/freeze-canvas-image.js'),
'utf8'
);
const REMOVE_NO_SCRIPT_ELEMENT_SNIPPET = fs.readFileSync(
path.resolve(__dirname, 'snippets/remove-no-script.js'),
'utf8'
Expand Down Expand Up @@ -636,6 +640,7 @@ async function snapshotWebpages(browser, webpages) {
// prepare it for snapshotting on Percy. See comments inside the
// snippet files for description of each.
await page.evaluate(REMOVE_AMP_SCRIPTS_SNIPPET);
await page.evaluate(FREEZE_CANVAS_IMAGE_SNIPPET);
await page.evaluate(REMOVE_NO_SCRIPT_ELEMENT_SNIPPET);

// Create a default set of snapshot options for Percy and modify
Expand Down

0 comments on commit 44c60a3

Please sign in to comment.