Skip to content

Commit

Permalink
fix: exclude skipped tests from report
Browse files Browse the repository at this point in the history
  • Loading branch information
dlockhart committed Aug 10, 2023
1 parent 2ef5922 commit c2e0361
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
7 changes: 0 additions & 7 deletions src/server/report/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,6 @@ function renderBrowserInfo(browser) {

function renderResult(resultData, options) {

if (!resultData.passed && resultData.info === undefined) {
return html`
<p>An error occurred that prevented a visual-diff snapshot from being taken:</p>
<pre>${resultData.error}</pre>
`;
}

const renderPart = (label, partInfo, overlay) => {
return html`
<div class="result-part">
Expand Down
25 changes: 15 additions & 10 deletions src/server/visual-diff-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,22 @@ function flattenResults(session, browserData, fileData) {
});
}
const testData = fileData.tests.get(testName);
if (!t.passed) {
browserData.numFailed++;
testData.numFailed++;

// tests missing info were skipped via grep, so exclude them
const info = getTestInfo(session, testKey);
if (info) {
if (!t.passed) {
browserData.numFailed++;
testData.numFailed++;
}
testData.results.push({
name: browserData.name,
duration: t.duration,
error: t.error?.message,
passed: t.passed,
info: info
});
}
testData.results.push({
name: browserData.name,
duration: t.duration,
error: t.error?.message,
passed: t.passed,
info: getTestInfo(session, testKey)
});
});
}

Expand Down

0 comments on commit c2e0361

Please sign in to comment.