Skip to content

Commit

Permalink
Show diff in render tests
Browse files Browse the repository at this point in the history
  • Loading branch information
karimnaaji committed Apr 7, 2022
1 parent b679671 commit 89f778c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/integration/lib/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ async function runTest(t) {
name: currentTestName,
actual,
expected,
imgDiff
imgDiff,
minDiff
};

const pass = minDiff <= options.allowed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"test": {
"width": 512,
"height": 512,
"allowed": 0.0015,
"operations": [
["setProjection", "globe"],
["wait"]
Expand Down
2 changes: 1 addition & 1 deletion test/util/html_generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const generateResultHTML = template(`
<% } else { %>
<input type="checkbox" id="<%- r.id %>">
<% } %>
<label class="tab-label" style="background: <%- r.color %>" for="<%- r.id %>"><p class="status-container"><span class="status"><%- r.status %></span> - <%- r.name %></p></label>
<label class="tab-label" style="background: <%- r.color %>" for="<%- r.id %>"><p class="status-container"><span class="status"><%- r.status %></span> - <%- r.name %> - diff: <%- r.minDiff %></p></label>
<div class="tab-content">
<% if (r.status !== 'errored') { %>
<img src="<%- r.actual %>">
Expand Down

0 comments on commit 89f778c

Please sign in to comment.