mochawesome icon indicating copy to clipboard operation
mochawesome copied to clipboard

Add an option at generating report to show collapsed/folded view of all test suites

Open helenou opened this issue 3 years ago • 5 comments

Is your feature request related to a problem? Please describe. While I also use mochawesome-merge to generate cypress reporting. I want to have a quick overview of fail/pass/skip of my tests for every scope/suite when i first open my report. Currently my report show expanded/unfolded view as standard (first load). when I currently use with Cypress for reporting, I want to be able to load the generated report.html file with first look (without a click) folded view.

Describe the solution you'd like when I currently use with Cypress for reporting, I want to be able to load the generated report.html file with first look folded view. Probably this could be a reporter option in cypress.json

Additional context Here's an expected result i'm looking for: ticket_mochawesome

helenou avatar Oct 07 '21 08:10 helenou

Hi again, perhaps my issue should relates to https://github.com/adamgruber/mochawesome-report-generator/

I found "autoOpen" option from mochawesome-report-generator, but i don't think my request is an existing functionality. I am looking for a summarized view.

helenou avatar Oct 12 '21 14:10 helenou

@helenou There are no current options that will do what you are requesting.

adamgruber avatar Oct 18 '21 16:10 adamgruber

@adamgruber could this be integrated into the roadmap?

Looking at the source code I found this may be in mochawesome-report-generator : https://github.com/adamgruber/mochawesome-report-generator/blob/f1521f0999bb5bcfb9136b9a050ad84c99815b09/src/client/components/suite/suite.js

where currently the standard behaviour is to display suites expanded first load. Could this

   state = {
    expanded: true,
  } 

be set to false via a command line. I'd prefer that option knowing I'm loading directly the resulting report.

Additionnally providing buttons "expand all" / "collapse all" would be useful too but not what i expect. I'd be happy to contribute if possible.

helenou avatar Oct 25 '21 08:10 helenou

I tested changing that parameter gives the view I'm looking for. However I'm not advanced in React and I don't know how to make this change when running the server. As I said, keen to contribute so any lights welcome @adamgruber

helenou avatar Oct 25 '21 21:10 helenou

hi @adamgruber could this be considered a new option to initially set to false as requested?

We do have a business case (view of report on TVs) for using the collapsed/folded view preferably.

helenou avatar Dec 30 '21 13:12 helenou