diff --git a/src/server/report/result.js b/src/server/report/result.js index f652af16..f85c934e 100644 --- a/src/server/report/result.js +++ b/src/server/report/result.js @@ -195,11 +195,14 @@ export function renderBrowserResults(browser, tests, options) { return acc; } - let status = STATUS_TYPE.WARNING; - if (resultData.duration > resultData.info.slowDuration) { - status = STATUS_TYPE.ERROR; - } else if (resultData.duration < (resultData.info.slowDuration / 2)) { - status = STATUS_TYPE.NORMAL; + let status = STATUS_TYPE.NORMAL; + if (resultData.info) { + status = STATUS_TYPE.WARNING; + if (resultData.duration > resultData.info.slowDuration) { + status = STATUS_TYPE.ERROR; + } else if (resultData.duration < (resultData.info.slowDuration / 2)) { + status = STATUS_TYPE.NORMAL; + } } return acc.push(html` diff --git a/src/server/visual-diff-reporter.js b/src/server/visual-diff-reporter.js index e92c1d6f..2cf823cd 100644 --- a/src/server/visual-diff-reporter.js +++ b/src/server/visual-diff-reporter.js @@ -70,6 +70,11 @@ function flattenResults(session, browserData, fileData) { tests.forEach(t => { const testName = `${prefix}${t.name}`; const testKey = testName.replaceAll(' > ', ' '); + const info = getTestInfo(session, testKey); + + // tests missing info but with no error were skipped via grep, so exclude them + if (!info && !t.error) return; + if (!fileData.tests.has(testName)) { fileData.tests.set(testName, { name: testName, @@ -87,7 +92,7 @@ function flattenResults(session, browserData, fileData) { duration: t.duration, error: t.error?.message, passed: t.passed, - info: getTestInfo(session, testKey) + info: info }); }); }