Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1665bfba
Commit
1665bfba
authored
Feb 04, 2021
by
Savas Vedova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes the default issue type id
- Update specs to test the passed down value
parent
b44fe05c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue
...ripts/integrations/edit/components/jira_issues_fields.vue
+1
-1
spec/frontend/integrations/edit/components/jira_issues_fields_spec.js
...d/integrations/edit/components/jira_issues_fields_spec.js
+14
-0
No files found.
app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue
View file @
1665bfba
...
@@ -49,7 +49,7 @@ export default {
...
@@ -49,7 +49,7 @@ export default {
initialVulnerabilitiesIssuetype
:
{
initialVulnerabilitiesIssuetype
:
{
type
:
String
,
type
:
String
,
required
:
false
,
required
:
false
,
default
:
''
,
default
:
undefined
,
},
},
initialProjectKey
:
{
initialProjectKey
:
{
type
:
String
,
type
:
String
,
...
...
spec/frontend/integrations/edit/components/jira_issues_fields_spec.js
View file @
1665bfba
...
@@ -126,6 +126,20 @@ describe('JiraIssuesFields', () => {
...
@@ -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
()
=>
{
it
(
'
emits "getJiraIssueTypes" to the eventHub when the jira-vulnerabilities component requests to fetch issue types
'
,
async
()
=>
{
const
eventHubEmitSpy
=
jest
.
spyOn
(
eventHub
,
'
$emit
'
);
const
eventHubEmitSpy
=
jest
.
spyOn
(
eventHub
,
'
$emit
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment