Commit 71c8f443 authored by Fatih Acet's avatar Fatih Acet

Merge branch...

Merge branch '35616-broken-anchor-for-learn-more-about-interacting-with-security-reports' into 'master'

Fix broken anchor for security report help page

Closes #35616

See merge request gitlab-org/gitlab!20524
parents 06ac318f d4c88dca
---
title: Use correct fragment identifier for vulnerability help path
merge_request: 20524
author:
type: fixed
<script> <script>
import { GlButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import { setUrlFragment } from '~/lib/utils/url_utility';
export default { export default {
name: 'SolutionCard', name: 'SolutionCard',
...@@ -42,7 +43,10 @@ export default { ...@@ -42,7 +43,10 @@ export default {
return (this.remediation && this.remediation.summary) || this.solution; return (this.remediation && this.remediation.summary) || this.solution;
}, },
helpPath() { helpPath() {
return `${this.vulnerabilityFeedbackHelpPath}#solutions-for-vulnerabilities`; return setUrlFragment(
this.vulnerabilityFeedbackHelpPath,
'solutions-for-vulnerabilities-auto-remediation',
);
}, },
showCreateMergeRequestMsg() { showCreateMergeRequestMsg() {
return !this.hasMr && this.hasRemediation && this.hasDownload; return !this.hasMr && this.hasRemediation && this.hasDownload;
......
...@@ -109,7 +109,7 @@ describe('Security Reports modal', () => { ...@@ -109,7 +109,7 @@ describe('Security Reports modal', () => {
it('renders help link', () => { it('renders help link', () => {
expect(wrapper.find('.js-link-vulnerabilityFeedbackHelpPath').attributes('href')).toBe( expect(wrapper.find('.js-link-vulnerabilityFeedbackHelpPath').attributes('href')).toBe(
'feedbacksHelpPath#solutions-for-vulnerabilities', 'feedbacksHelpPath#solutions-for-vulnerabilities-auto-remediation',
); );
}); });
}); });
......
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