Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshots stopped showing up on reports after upgrade to v6.0.1 #183

Closed
brnquester opened this issue Dec 3, 2021 · 1 comment
Closed

Comments

@brnquester
Copy link

After the latest upgrade the snapshots stopped showing up on the report and now shows a code on its place as below:

[
  [
    {
      "title": "Failed screenshot",
      "value": "/1-forms/sales-de.spec.js/sales (failed).png"
    }
  ]
]

Packages used:

"cypress": "^9.1.0",
"mocha": "^9.1.3",
"mochawesome": "^7.0.1",
"mochawesome-merge": "^4.2.1",
"mochawesome-report-generator": "^6.0.1"

Commands to generate the report

"cypress:run": "cypress run || npm run posttest",
"cypress:merge": "mochawesome-merge cypress/reports/*.json > cypress/reports/fullreport.json",
"cypress:generate": "marge cypress/reports/fullreport.json --reportDir cypress/reports/ --inline",

Reporter configs

"reporter": "mochawesome",
    "screenShotOnRunFailure": true,
    "screenshotsFolder": "cypress/reports/screenshots/",
    "reporterOptions": {
            "reportDir": "cypress/reports/",
            "overwrite": false,
            "html": false,
            "json": true,
            "timestamp": "mmddyyyy_HHMMss",
            "embeddedScreenshots": true,
            "inlineAssets": true,
            "charts": true            
        },      

Note: The actual snapshot files are created just fine, I was able to open them in the preset folder.

Expected result

The snapshot showing inline inside the final report. It was working fine in the previous version used.

Actual result

Shows a JSON like code on the snapshot place.

@brnquester
Copy link
Author

The issue has been resolved. In my case, there was a conflict between @mochawesome-report-generator and @cypress-mochawesome-reporter configuration. I had the hooks for cypress-mochawesome-reporter defined as this example; however, I was calling in my cypress.json the parameter "reporter": "mochawesome".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant