Skip to content

Commit

Permalink
fix: Workaround for domTransformation error caused by empty document (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
krasnoukhov authored Sep 21, 2020
1 parent a13fbb9 commit c1dc06b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addon-test-support/@percy/ember/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ export default async function percySnapshot(name, options = {}) {
handleAgentCommunication: false,
// We only want to capture the ember application, not the testing UI
domTransformation: function(clonedDom) {
if (!clonedDom.querySelector(scopedSelector)) {
return clonedDom;
}

if (options.domTransformation) {
options.domTransformation(clonedDom);
}
Expand Down

0 comments on commit c1dc06b

Please sign in to comment.