Commit bb9c79e2 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch...

Merge branch '337058-vulnerability-details-create-new-jira-issue-shows-even-when-its-not-enabled' into 'master'

Stop showing Jira-issue button when setting is disabled

See merge request gitlab-org/gitlab!67206
parents 09c4c406 f0fc9918
...@@ -222,10 +222,7 @@ export default { ...@@ -222,10 +222,7 @@ export default {
class="card-body" class="card-body"
/> />
</div> </div>
<related-jira-issues <related-jira-issues v-if="createJiraIssueUrl" class="gl-mt-6" />
v-if="createJiraIssueUrl || glFeatures.createVulnerabilityJiraIssueViaGraphql"
class="gl-mt-6"
/>
<related-issues <related-issues
v-else v-else
:endpoint="issueLinksEndpoint" :endpoint="issueLinksEndpoint"
......
...@@ -285,27 +285,18 @@ describe('Vulnerability Footer', () => { ...@@ -285,27 +285,18 @@ describe('Vulnerability Footer', () => {
const relatedJiraIssues = () => wrapper.find(RelatedJiraIssues); const relatedJiraIssues = () => wrapper.find(RelatedJiraIssues);
describe.each` describe.each`
createJiraIssueUrl | createVulnerabilityJiraIssueViaGraphql | shouldShowRelatedJiraIssues createJiraIssueUrl | shouldShowRelatedJiraIssues
${'http://foo'} | ${false} | ${true} ${'http://foo'} | ${true}
${'http://foo'} | ${true} | ${true} ${''} | ${false}
${''} | ${true} | ${true}
${''} | ${false} | ${false}
`( `(
'with createVulnerabilityJiraIssueViaGraphql set to "$createVulnerabilityJiraIssueViaGraphql"', 'with "createJiraIssueUrl" set to "$createJiraIssueUrl"',
({ ({ createJiraIssueUrl, shouldShowRelatedJiraIssues }) => {
createJiraIssueUrl,
createVulnerabilityJiraIssueViaGraphql,
shouldShowRelatedJiraIssues,
}) => {
beforeEach(() => { beforeEach(() => {
createWrapper( createWrapper(
{}, {},
{ {
provide: { provide: {
createJiraIssueUrl, createJiraIssueUrl,
glFeatures: {
createVulnerabilityJiraIssueViaGraphql,
},
}, },
}, },
); );
......
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