-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
HTML Reporter for angular (karma) always runs all specs #1906
Comments
@jlpstolwijk Sorry, but I reverted your fix for this because it breaks the functionality of the options checkboxes (accessed via the options button in the top right corner). If you'd like to submit another fix for the Karma issue that doesn't break existing functionality, I'd be happy to review it. |
ah too bad, sorry about that! I'll have a look |
…hrefs + comments + fixed tests
…hrefs + comments + fixed tests
I've create a new PR that doesn't break existing functionality, as far as I can see |
Expected Behavior
When clicking a spec in the html report, only that spec should be run.
(Using karma-jasmine-html-reporter, but issue should be fixed in jasmine itself, see below).
Current Behavior
When clicking a spec in the html report, the full page reloads, running all specs again. Both in regular report and in debug mode.
This seems to be caused by the combination of 2 things:
<a title="should be created" href="?spec=ConfirmService%20should%20be%20created">should be created</a>
<base href="/">
in the header. The angular team apparently added this in response to this issue.See also this issue, filed on karma repo (also not picked up there, because it belongs to jasmine), and this one on karma-jasmine repo.
Possible Solution
I'm working on a PR, which I will link to this issue. This involves adding the url pathname + query string to the href of the spec, instead of only adding the query string.
This solution was inspired by this issue + PR on karma-jasmine-html-reporter, which was rejected because that repo basically copies its code from jasmine. I hope the current PR can be incorporated in jasmine and then copied to karma-jasmine-html-reporter.
Suite that reproduces the behavior (for bugs)
Then click on a single spec
=> notice that page reloads, and all specs are run again.
Same issue happens in debug mode.
Your Environment
The text was updated successfully, but these errors were encountered: