LironEr / cypress-mochawesome-reporter

Zero config Mochawesome reporter for Cypress with screenshots and videos
MIT License
158 stars 49 forks source link

Screenshots are not attached to html report #192

Closed Uriyay2 closed 3 months ago

Uriyay2 commented 4 months ago

Environment

- OS: MAC
- Node: 16.15.1
- cypress-mochawesome-reporter: 3.8.2
- cypress: 12.13.0

What happened?

In the generated html report screendshots and videos are not dispayed, though the assets directory indeed created. the videos and screenshots folders are created as well. what am i missing?

Screenshot 2024-05-01 at 11 21 21

![Uploading Screenshot 2024-05-01 at 11.23.02.png…]()

Config file

module.exports = defineConfig({
  reporter: 'cypress-mochawesome-reporter',
  reporterOptions: {
    reportsDir: 'cypress/reports',
    charts: true,
    reportPageTitle: E2E Test Report',
    reportTitle: 'E2E Test Report',
    embeddedScreenshots: true,
    saveAllAttempts: true,
    ignoreVideos: true,
    videoOnFailOnly: true
  },
  screenshotOnRunFailure: true,
  video: true,
  e2e: {
    setupNodeEvents(on, config) {
      require('cypress-mochawesome-reporter/plugin')(on);
}

Relevant log output

No response

Anything else?

No response

guy-pimloc commented 3 months ago

https://github.com/LironEr/cypress-mochawesome-reporter/issues/166#issuecomment-1936732444

Have you tried this, I was having the same issue and this solved it

Uriyay2 commented 3 months ago

@guy-pimloc Thanks! I had to changed to configuration to my supoort e2e.js file and it works fine.