Do not display code coverage download button
Ref: #241502 (closed)
What does this MR do and why?
This MR fixes a bug where the download button associated to the project code coverage data where always displayed.
It also moves part of chart.haml to code_coverage.vue.
Screenshots or screen recordings
Testing instructions
git checkout master
- find/clone a project that reports a coverage percentage in its pipeline
- run a pipeline in the project, allow it to finish so that the coverage value can be parsed and stored
- in the project's sidebar, navigate to
Analytics
=>Repository
- there should be a coverage graph along with a
Download raw data (.csv)
button - find another project with no coverage data, and in the project's sidebar, navigate to
Analytics
=>Repository
- the
Download raw data (.csv)
button is also displayed here, which is confusing because there is no data to download -
git checkout morefice/fix-download-code-coverage-button
and refresh the analytics pages for each project - for the project with coverage data, the
Download raw data (.csv)
button should still be there - for the project with no coverage data, the
Download raw data (.csv)
button should not be there
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Miranda Fluharty