Commit 3ea52d8a authored by Mark Florian's avatar Mark Florian

Merge branch '255183-bug-hide-fuzz-mr-widget' into 'master'

Resolve "Bug - Fuzz testing results in MR widget shows security row as ALWAYS 0 vulns detected."

See merge request gitlab-org/gitlab!43278
parents f8a0fa95 0e2f623a
......@@ -223,7 +223,14 @@ export default {
return this.enabledReports.dast;
},
hasCoverageFuzzingReports() {
return this.enabledReports.coverageFuzzing;
/*
* Fixes bug https://gitlab.com/gitlab-org/gitlab/-/issues/255183
* For https://gitlab.com/gitlab-org/gitlab/-/issues/210343 change to:
* return this.enabledReports.coverageFuzzing;
*/
return (
gl?.mrWidgetData?.coverage_fuzzing_comparison_path && this.enabledReports.coverageFuzzing
);
},
hasSastReports() {
return this.enabledReports.sast;
......
......@@ -581,6 +581,40 @@ describe('Grouped security reports app', () => {
});
});
describe('coverage fuzzing reports', () => {
/*
* Fixes bug https://gitlab.com/gitlab-org/gitlab/-/issues/255183
* For https://gitlab.com/gitlab-org/gitlab/-/issues/210343
* replace with updated tests
*/
describe.each`
endpoint | shouldShowFuzzing
${'/fuzzing'} | ${true}
${undefined} | ${false}
`(
'given coverage fuzzing comparision enpoint is $endpoint',
({ endpoint, shouldShowFuzzing }) => {
beforeEach(() => {
gl.mrWidgetData = gl.mrWidgetData || {};
gl.mrWidgetData.coverage_fuzzing_comparison_path = endpoint;
createWrapper({
...props,
enabledReports: {
coverageFuzzing: true,
},
});
});
it(`${shouldShowFuzzing ? 'renders' : 'does not render'}`, () => {
expect(wrapper.find('[data-qa-selector="coverage_fuzzing_report"]').exists()).toBe(
shouldShowFuzzing,
);
});
},
);
});
describe('Out of date report', () => {
const createComponent = (extraProp, done) => {
gl.mrWidgetData = gl.mrWidgetData || {};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment