JamesMGreene / qunit-composite

A QUnit plugin for running multiple test files.
Other
34 stars 14 forks source link

Separate/Remove the HTML reporter enhancements? #10

Open JamesMGreene opened 10 years ago

JamesMGreene commented 10 years ago

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 commented 10 years ago

@jzaefferer @Krinkle @leobalter Thoughts on this?

jzaefferer commented 10 years ago

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

JamesMGreene commented 10 years ago

@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.

platinumazure commented 9 years ago

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 commented 8 years ago

@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.