Commit 99b061be authored by Miguel Rincon's avatar Miguel Rincon

Merge branch 'fix-jira-issue-creation' into 'master'

Fixes the default issue type id

See merge request gitlab-org/gitlab!53365
parents 41a43001 1665bfba
......@@ -49,7 +49,7 @@ export default {
initialVulnerabilitiesIssuetype: {
type: String,
required: false,
default: '',
default: undefined,
},
initialProjectKey: {
type: String,
......
......@@ -126,6 +126,20 @@ describe('JiraIssuesFields', () => {
},
);
it('passes down the correct initial-issue-type-id value when value is empty', async () => {
await setEnableCheckbox(true);
expect(findJiraForVulnerabilities().attributes('initial-issue-type-id')).toBeUndefined();
});
it('passes down the correct initial-issue-type-id value when value is not empty', async () => {
const jiraIssueType = 'some-jira-issue-type';
wrapper.setProps({ initialVulnerabilitiesIssuetype: jiraIssueType });
await setEnableCheckbox(true);
expect(findJiraForVulnerabilities().attributes('initial-issue-type-id')).toBe(
jiraIssueType,
);
});
it('emits "getJiraIssueTypes" to the eventHub when the jira-vulnerabilities component requests to fetch issue types', async () => {
const eventHubEmitSpy = jest.spyOn(eventHub, '$emit');
......
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