wdio-timeline-reporter
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -299,4 +299,15 @@ const events = require('events'); | ||
const imagesHtml = screenshots.reduce((accumulator, currentValue) => { | ||
var data = embedImage ? base64Img.base64Sync(currentValue) : currentValue; | ||
return `${accumulator}<img class="screenshot-img" src="${data}" />` | ||
// errror screenshots dont come with path | ||
if (fs.existsSync(currentValue)) { | ||
const data = embedImage ? base64Img.base64Sync(currentValue) : currentValue; | ||
return `${accumulator}<img class="screenshot-img" src="${data}" />` | ||
} else if (!!this.config.screenshotPath) { | ||
const imagePath = path.join(process.cwd(), this.config.screenshotPath, currentValue); | ||
if (fs.existsSync(imagePath)) { | ||
const data = embedImage ? base64Img.base64Sync(imagePath) : imagePath; | ||
return `${accumulator}<img class="screenshot-img" src="${data}" />` | ||
} | ||
} | ||
console.warn(`TIMELINE REPORTER: Could not attach image: ${currentValue}`); | ||
return accumulator; | ||
}, ''); | ||
@@ -303,0 +314,0 @@ |
{ | ||
"name": "wdio-timeline-reporter", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/timeline-reporter.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15625
322