LironEr / cypress-mochawesome-reporter

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

Not able to implement imbedded screenshots #112

Closed vitaliy4us closed 1 year ago

vitaliy4us commented 1 year ago

Environment

- OS: Windows 10
- Node: 16
- cypress-mochawesome-reporter: 3.2.3
- cypress: 10

What happened?

I am trying to implement Mochawsome report to my Cypress 10 framework. I use cypress-mochawesome-reporter plugin and set it up regarding npm package instructions https://www.npmjs.com/package/cypress-mochawesome-reporter. But the problem is that the report is generated without imbedded screenshots despite of using embeddedScreenshots: true parameter in reporterOptions object. cypress/screenshots folder contains the necessary screenshots but they are missing in the report.

P.S. I have to add an important remark. Further investigation revealed that some screenshots are embedded, but a half of them are not. On the moment of publishing this report I used only 1 test to check if the plugin work at all and got a report without screenshot. Now I have a big number of tests: 81 tests total, 26 failed, and only 15 of them have screenshots. Screenshots folder contains images for all failed tests

Config file

module.exports = defineConfig({
    video: false,
    reporter: 'cypress-mochawesome-reporter',
    reporterOptions: {
        charts: true,
        reportPageTitle: 'mochawsome',
        embeddedScreenshots: true,
        inlineAssets: true,
        saveAllAttempts: false,
  },
  e2e: {
        experimentalStudio: true,
    experimentalSessionAndOrigin: true,
    chromeWebSecurity: false,
    setupNodeEvents(on, config) {
            require('cypress-mochawesome-reporter/plugin')(on);
        return require('./cypress/plugins/index.js')(on, config)
    },
    },
})

Relevant log output

No response

Anything else?

mochawspme image
LironEr commented 1 year ago

Please create a repo with the problem and steps to reproduce the issue so I can have a look.

Thanks.

stale[bot] commented 1 year ago

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.