onComplete: async (): Promise<void> => {
// Generate the report when it all tests are done
let date = new Date();
generate({
jsonDir: `${process.cwd()}/report`,
reportPath: `${process.cwd()}/report/cucumber-html-report`,
openReportInBrowser: true,
disableLog: true,
saveCollectedJSON: true,
reportName: 'Sanity Tests Report',
customData: {
title: 'Picart Web Sanity Tests Report',
data: [
{ label: 'Project', value: 'AQA-PICART-AUTOMATION' },
{ label: 'Environment', value: global.env },
{ label: 'BaseURL', value: global.baseUrl },
{ label: 'Platform', value: process.platform },
{ label: 'Date', value: date.toLocaleDateString() }
]}
});
},
Describe the bug
Image is broken in the generated report for the attach diff image. Image is there in the location. Double checked the path to the image is correct.
Scrrenshot attached for the inspect below.
Normal screenshot of browser is attach successfully as expected.
This is because you are attaching the image as a url, it needs to be a base64 string. You need to read the file from your file system and read it as a base64 string, and then attach it
Environment (please complete the following information):
Config of webdriver.io and the reporter
Describe the bug Image is broken in the generated report for the attach diff image. Image is there in the location. Double checked the path to the image is correct. Scrrenshot attached for the inspect below.
Normal screenshot of browser is attach successfully as expected.
if i remove "data:image/png;base64," from above html , image gets rendered correctly but i believe this approach is incorrect.
Appreciate your help. Let me know if you need more information.
[Include code or an example repository that can easily be set up]
Expected Attached image should render correctly from the path.