qunit-composite icon indicating copy to clipboard operation
qunit-composite copied to clipboard

Separate/Remove the HTML reporter enhancements?

Open JamesMGreene opened this issue 11 years ago • 5 comments

In QUnit core, the HTML reporter has been [mostly] divided to work independently of the core codebase. Should we also separate the HTML reporter aspects of this plugin? The plugin should still be able to be used and add value even if the HTML reporter is not being used.

Ideally, this plugin wouldn't even need to modify the HTML Reporter at all. The two things it currently updates are:

  1. The "rerun" behavior, which is sets to open up the suite's individual test page.
    • Relevant code snippets: qunit-composite.js#L155-L163 and qunit-composite.js#L172-L173
    • Perhaps we can work something into the new testId PR (jquery/qunit#661) to help cover this functionality?
    • It also wouldn't be terrible to have it rerun at the top-level composite but it does definitely make it a bit harder to debug failing tests.
  2. Undoes the auto-expansion of failed tests
    • Relevant code snippets: qunit-composite.js#L165-L170
    • Perhaps we can work something into a future PR to address Issue jquery/qunit#664 ("Collapse failed tests in HTML reporter")?
    • It also wouldn't be critical to lose this feature.

Also, potential future visual enhancements to the HTML Reporter as a result of a forthcoming PR for jquery/qunit#543 (nested suites) would also probably work wonders for cleaning up the UI of the HTML Reporter when used in conjunction with qunit-composite.

JamesMGreene avatar Sep 16 '14 17:09 JamesMGreene

@jzaefferer @Krinkle @leobalter Thoughts on this?

JamesMGreene avatar Oct 14 '14 13:10 JamesMGreene

Seems fine to me to drop both enhancements. For the record, I heavily prefer to release 1.16 before spending any time on this.

jzaefferer avatar Oct 17 '14 14:10 jzaefferer

@jzaefferer: Yeah, definitely no need for this to hold up QUnit core v1.16.0. Core will be my first focus when I get time again.

JamesMGreene avatar Oct 17 '14 16:10 JamesMGreene

FYI, pull request #17 may help with item 1 in your list (in that the decision to simply drop support for the "Rerun" links would not impede access to individual suites).

platinumazure avatar Apr 11 '15 20:04 platinumazure

@JamesMGreene Thanks very much for merging PR #17. If you want to get back to this issue, I wanted to mention once again that #17 may simplify your decision here:

  1. The "rerun" behavior, which is sets to open up the suite's individual test page.
    • Relevant code snippets: qunit-composite.js#L155-L163 and qunit-composite.js#L172-L173
    • Perhaps we can work something into the new testId PR (jquery/qunit#661) to help cover this functionality?
    • It also wouldn't be terrible to have it rerun at the top-level composite but it does definitely make it a bit harder to debug failing tests.

If you wanted to just remove the composite rerun-modifying functionality and let it follow QUnit's normal behavior, you could do so and just note in your docs that the suite links at the top of the page are useful for running individual suites.

Of course, you may have an entirely different direction in mind. If so, no worries.

platinumazure avatar Mar 28 '16 02:03 platinumazure