cypress-mochawesome-reporter
cypress-mochawesome-reporter copied to clipboard
Cypress mochawesome report is showing a broken img
Environment
- OS: Windows 11
- Node: v18.17.1
- cypress-mochawesome-reporter:
- cypress: 13.3.0
What happened?
The reporter is saving the screenshots in the main cypress file which makes the report show a broken img
Config file
cypress.config.js:
module.exports = defineConfig({
projectId: "4d49nh",
defaultCommandTimeout: 20000,
requestTimeout: 30000,
chromeWebSecurity: false,
retries: 0,
video: true,
reporter: "cypress-mochawesome-reporter",
reporterOptions: {
// reportDir: "cypress/reports/",
// json: false,
// html: true,
videoOnFailOnly: false,
overwrite: true,
charts: true,
reportPageTitle: "custom-title",
embeddedScreenshots: true,
screenshotOnRunFailure: true,
inlineAssets: false,
saveAllAttempts: false,
screenshotsFolder: "cypress/reports/screenshots",
},
e2e: {
testIsolation: true,
setupNodeEvents(on, config) {
// implement node event listeners here
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();
// });
},
},
env: {
},
});
Relevant log output
No response
Anything else?
No response
Please create a repo with the problem and steps to reproduce the issue so I can have a look.
Thanks.
I found this problem too, when open the report in Jenkins and it show error as below:
Refused to load the font '<URL>' because it violates the following Content Security Policy directive: "default-src 'self' 'unsafe-inline' *". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback. Note that '*' matches only URLs with network schemes ('http', 'https', 'ws', 'wss'), or URLs whose scheme matches `self`'s scheme. The scheme 'data:' must be added explicitly.
Refused to load the image
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.