Commit f0fc9918 authored by Dave Pisek's avatar Dave Pisek

Fix showing Jira-issue button when setting is disabled

This fix makes sure that the "Create Jira Issue" button on the
vulnerability details page only shows when the respective
setting has been enabled.
parent a41a12e5
......@@ -222,10 +222,7 @@ export default {
class="card-body"
/>
</div>
<related-jira-issues
v-if="createJiraIssueUrl || glFeatures.createVulnerabilityJiraIssueViaGraphql"
class="gl-mt-6"
/>
<related-jira-issues v-if="createJiraIssueUrl" class="gl-mt-6" />
<related-issues
v-else
:endpoint="issueLinksEndpoint"
......
......@@ -285,27 +285,18 @@ describe('Vulnerability Footer', () => {
const relatedJiraIssues = () => wrapper.find(RelatedJiraIssues);
describe.each`
createJiraIssueUrl | createVulnerabilityJiraIssueViaGraphql | shouldShowRelatedJiraIssues
${'http://foo'} | ${false} | ${true}
${'http://foo'} | ${true} | ${true}
${''} | ${true} | ${true}
${''} | ${false} | ${false}
createJiraIssueUrl | shouldShowRelatedJiraIssues
${'http://foo'} | ${true}
${''} | ${false}
`(
'with createVulnerabilityJiraIssueViaGraphql set to "$createVulnerabilityJiraIssueViaGraphql"',
({
createJiraIssueUrl,
createVulnerabilityJiraIssueViaGraphql,
shouldShowRelatedJiraIssues,
}) => {
'with "createJiraIssueUrl" set to "$createJiraIssueUrl"',
({ createJiraIssueUrl, shouldShowRelatedJiraIssues }) => {
beforeEach(() => {
createWrapper(
{},
{
provide: {
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