wdio-mochawesome-reporter icon indicating copy to clipboard operation
wdio-mochawesome-reporter copied to clipboard

Add compatibility for Mochawesome Report Generator 4.x

Open maeriens opened this issue 5 years ago • 0 comments

After fiddling a bit with the example and seeing it fail, and finding issue no #47, I saw that the issue is that marge has moved forward a major version, thus making new installs fail. Mochawesome Report Generator 4 has a few changes regarding the structure of the file, as can be seen in the bin/src/types.js file in the comparison betwene v3 and v4.(https://github.com/adamgruber/mochawesome-report-generator/compare/3.1.5...4.0.0)

Changes I could see are

  • Removal of PercentClass object. I think its now optional but no idea how it's handled by marge.
  • Removed isRoot from TestStruct
  • Removed copyright year
  • Renamed top level suite to results
  • Results now receives an array of suites, not the plain object
  • added ReportMeta with mocha, mochawesome and marge data
  • added Meta tagging

The last two items I was not sure how to implement so I would kindly ask whomever want to see to that to help as I don't think I am savvy enough to accomplish the task. Same thing goes to the onSuiteEnd() function in index.js, I am placing everything at index 0 but as I only tested with a barebones wdio test and not a suite, I know not if it will work with suites or even multiple tests.

Also - @fijijavis why isn't a package-lock.json file in the repo?

maeriens avatar Sep 15 '19 04:09 maeriens