Improve CSV export button tests
We have tests for the CSV export button on the vulnerability details page:
The button uses app/assets/javascripts/lib/utils/downloader.js
to dynamically create an anchor element that it programmatically clicks on to initiate the download.
The tests does a bunch of spying and mocking in order to test this properly, but we can simplify this by mocking out the downloader.js
entirely and just check that it was called.
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines - [-] Style guides
- [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done