Commit 6e05534f authored by Phil Hughes's avatar Phil Hughes

Merge branch '289815-add-external-icon' into 'master'

Add external link to create jira issue button

See merge request gitlab-org/gitlab!54310
parents f11bf3bb 098fbac7
<script>
import { GlButton } from '@gitlab/ui';
import { GlButton, GlIcon } from '@gitlab/ui';
import DismissButton from 'ee/vue_shared/security_reports/components/dismiss_button.vue';
import SplitButton from 'ee/vue_shared/security_reports/components/split_button.vue';
import { s__ } from '~/locale';
......@@ -9,6 +9,7 @@ export default {
DismissButton,
GlButton,
SplitButton,
GlIcon,
},
props: {
modal: {
......@@ -77,6 +78,7 @@ export default {
isLoading: this.isCreatingIssue,
action: this.vulnerability.create_jira_issue_url ? undefined : 'createNewIssue',
href: this.vulnerability.create_jira_issue_url,
icon: this.vulnerability.create_jira_issue_url ? 'external-link' : undefined,
};
const MRButton = {
name: s__('ciReport|Resolve with merge request'),
......@@ -147,6 +149,11 @@ export default {
:href="actionButtons[0].href"
@click="$emit(actionButtons[0].action)"
>
<gl-icon
v-if="actionButtons[0].icon"
:name="actionButtons[0].icon"
class="gl-vertical-align-middle"
/>
{{ __(actionButtons[0].name) }}
</gl-button>
</div>
......
---
title: Add external link to create jira issue button
merge_request: 54310
author:
type: changed
import { GlIcon } from '@gitlab/ui';
import { mount } from '@vue/test-utils';
import DismissButton from 'ee/vue_shared/security_reports/components/dismiss_button.vue';
import component from 'ee/vue_shared/security_reports/components/modal_footer.vue';
......@@ -74,6 +75,10 @@ describe('Security Reports modal footer', () => {
it('has the correct text', () => {
expect(findActionButton().text()).toBe('Create Jira issue');
});
it('has the external-link icon', () => {
expect(findActionButton().find(GlIcon).props('name')).toBe('external-link');
});
});
describe('can only create merge request', () => {
......
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