Closed Alfy102 closed 1 year ago
Resolve by removing the async from setupNodeEvents in cypress.config.js
Causing Issue:
async setupNodeEvents(on, config) {
require('cypress-mochawesome-reporter/plugin')(on);
on('before:run', async (details) => {
console.log('override before:run');
await beforeRunHook(details);
});
on('after:run', async () => {
console.log('override after:run');
await afterRunHook();
});
require('cypress-terminal-report/src/installLogsPrinter')(on, options);
await preprocessor.addCucumberPreprocessorPlugin(on, config);
Fix:
setupNodeEvents(on, config) {
require('cypress-mochawesome-reporter/plugin')(on);
on('before:run', async (details) => {
console.log('override before:run');
await beforeRunHook(details);
});
on('after:run', async () => {
console.log('override after:run');
await afterRunHook();
});
require('cypress-terminal-report/src/installLogsPrinter')(on, options);
preprocessor.addCucumberPreprocessorPlugin(on, config);
Environment
What happened?
Broken screenshot link.![image](https://github.com/LironEr/cypress-mochawesome-reporter/assets/8023501/6b710ce3-1570-4199-af10-dc9e43e90b80)
Upon checking page inspect:![image](https://github.com/LironEr/cypress-mochawesome-reporter/assets/8023501/d7b6db6f-1a89-4089-865f-217357156a67)
From the html document, removing the backward slash infront of the screenshot path in href and src fixed it.
![image](https://github.com/LironEr/cypress-mochawesome-reporter/assets/8023501/9e058d83-e95d-40e3-9dd8-6cbf7c1ea5e7)
Config file
Relevant log output
No response
Anything else?
Trying to figure out why the HTML report puts that backward slash there.