Skip to content

Improve CSV export button tests

Daniel Tian requested to merge 220601-improve-csv-export-button-tests into master

We have tests for the CSV export button on the vulnerability details page:

ksnip_20200827-142657

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

Availability and Testing

Merge request reports

Loading