We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2f1a66 commit 9aa0b8fCopy full SHA for 9aa0b8f
test/percy/snapshots.yml
@@ -2,6 +2,21 @@ version: 2
2
static:
3
options:
4
waitForTimeout: 6000
5
+ execute:
6
+ beforeSnapshot: |
7
+ const stash = window._canvasStash = [];
8
+ Array.from(document.querySelectorAll('canvas')).forEach(c => {
9
+ const i = document.createElement('img');
10
+ i.src = c.toDataURL();
11
+ i.width = c.width;
12
+ i.height = c.height;
13
+ i.setAttribute('style', c.getAttribute('style'));
14
+ i.className = c.className;
15
+ i.setAttribute('data-canvasnum', stash.length);
16
+ stash.push(c);
17
+ c.parentElement.insertBefore(i, c);
18
+ c.parentElement.removeChild(c);
19
+ });
20
snapshot:
21
widths:
22
- 1280
0 commit comments