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
3b146415
Commit
3b146415
authored
Sep 11, 2020
by
Daniel Tian
Committed by
Mark Florian
Sep 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove issue note from vulnerability details
parent
407725a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
29 deletions
+19
-29
ee/app/assets/javascripts/vulnerabilities/components/footer.vue
.../assets/javascripts/vulnerabilities/components/footer.vue
+1
-13
ee/changelogs/unreleased/222346-remove-issue-note-from-vulnerability-details.yml
...d/222346-remove-issue-note-from-vulnerability-details.yml
+5
-0
ee/spec/frontend/vulnerabilities/footer_spec.js
ee/spec/frontend/vulnerabilities/footer_spec.js
+13
-16
No files found.
ee/app/assets/javascripts/vulnerabilities/components/footer.vue
View file @
3b146415
<
script
>
import
Visibility
from
'
visibilityjs
'
;
import
IssueNote
from
'
ee/vue_shared/security_reports/components/issue_note.vue
'
;
import
SolutionCard
from
'
ee/vue_shared/security_reports/components/solution_card.vue
'
;
import
MergeRequestNote
from
'
ee/vue_shared/security_reports/components/merge_request_note.vue
'
;
import
Api
from
'
ee/api
'
;
...
...
@@ -18,7 +17,6 @@ import initUserPopovers from '~/user_popovers';
export
default
{
name
:
'
VulnerabilityFooter
'
,
components
:
{
IssueNote
,
SolutionCard
,
MergeRequestNote
,
HistoryEntry
,
...
...
@@ -208,18 +206,8 @@ export default {
<div
data-qa-selector=
"vulnerability_footer"
>
<solution-card
v-if=
"hasSolution"
v-bind=
"solutionInfo"
/>
<div
v-if=
"vulnerability.issue_feedback || vulnerability.merge_request_feedback"
class=
"card gl-mt-5"
>
<issue-note
v-if=
"vulnerability.issue_feedback"
:feedback=
"vulnerability.issue_feedback"
:project=
"project"
class=
"card-body"
/>
<div
v-if=
"vulnerability.merge_request_feedback"
class=
"card gl-mt-5"
>
<merge-request-note
v-if=
"vulnerability.merge_request_feedback"
:feedback=
"vulnerability.merge_request_feedback"
:project=
"project"
class=
"card-body"
...
...
ee/changelogs/unreleased/222346-remove-issue-note-from-vulnerability-details.yml
0 → 100644
View file @
3b146415
---
title
:
Remove issue note from vulnerability details
merge_request
:
40686
author
:
type
:
changed
ee/spec/frontend/vulnerabilities/footer_spec.js
View file @
3b146415
...
...
@@ -6,7 +6,6 @@ import RelatedIssues from 'ee/vulnerabilities/components/related_issues.vue';
import
StatusDescription
from
'
ee/vulnerabilities/components/status_description.vue
'
;
import
{
VULNERABILITY_STATES
}
from
'
ee/vulnerabilities/constants
'
;
import
SolutionCard
from
'
ee/vue_shared/security_reports/components/solution_card.vue
'
;
import
IssueNote
from
'
ee/vue_shared/security_reports/components/issue_note.vue
'
;
import
MergeRequestNote
from
'
ee/vue_shared/security_reports/components/merge_request_note.vue
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
...
...
@@ -81,23 +80,21 @@ describe('Vulnerability Footer', () => {
});
});
describe
.
each
`
type | prop | component
${
'
issue
'
}
|
${
'
issue_feedback
'
}
|
${
IssueNote
}
${
'
merge request
'
}
|
${
'
merge_request_feedback
'
}
|
${
MergeRequestNote
}
`
(
'
$type note
'
,
({
prop
,
component
})
=>
{
// The object itself does not matter, we just want to make sure it's passed to the issue note.
const
feedback
=
{};
it
(
'
shows issue note when an issue exists for the vulnerability
'
,
()
=>
{
createWrapper
({
[
prop
]:
feedback
});
expect
(
wrapper
.
find
(
component
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
component
).
props
(
'
feedback
'
)).
toBe
(
feedback
);
});
describe
(
'
merge request note
'
,
()
=>
{
const
mergeRequestNote
=
()
=>
wrapper
.
find
(
MergeRequestNote
);
it
(
'
does not show
issue note when there is no issue
for the vulnerability
'
,
()
=>
{
it
(
'
does not show
merge request note when a merge request does not exist
for the vulnerability
'
,
()
=>
{
createWrapper
();
expect
(
wrapper
.
find
(
component
).
exists
()).
toBe
(
false
);
expect
(
mergeRequestNote
().
exists
()).
toBe
(
false
);
});
it
(
'
shows merge request note when a merge request exists for the vulnerability
'
,
()
=>
{
// The object itself does not matter, we just want to make sure it's passed to the issue note.
const
mergeRequestFeedback
=
{};
createWrapper
({
merge_request_feedback
:
mergeRequestFeedback
});
expect
(
mergeRequestNote
().
exists
()).
toBe
(
true
);
expect
(
mergeRequestNote
().
props
(
'
feedback
'
)).
toBe
(
mergeRequestFeedback
);
});
});
...
...
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