test: percy snapshot workaround (#1085)
* Try workaround for percy snapshot * Return our modified document
This commit is contained in:
parent
3a12138134
commit
7668b69f20
@ -312,10 +312,12 @@ Cypress.Commands.add('isInViewport', element => {
|
||||
*
|
||||
*/
|
||||
Cypress.Commands.add('percyCanvasSnapshot', (name, options = {}) => {
|
||||
function convertCanvas(document) {
|
||||
document
|
||||
function convertCanvas(documentClone) {
|
||||
documentClone
|
||||
.querySelectorAll('canvas')
|
||||
.forEach(selector => canvasToImage(selector));
|
||||
|
||||
return documentClone;
|
||||
}
|
||||
|
||||
function canvasToImage(selectorOrEl) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user