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
7a77698f
Commit
7a77698f
authored
Jun 18, 2020
by
Michał Zając
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use {issue,merge_request}_feedback in footer
parent
71ec3c49
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
20 deletions
+27
-20
ee/app/assets/javascripts/pages/projects/security/vulnerabilities/show/index.js
...pts/pages/projects/security/vulnerabilities/show/index.js
+4
-2
ee/app/assets/javascripts/vulnerabilities/components/footer.vue
.../assets/javascripts/vulnerabilities/components/footer.vue
+15
-5
ee/spec/frontend/vulnerabilities/footer_spec.js
ee/spec/frontend/vulnerabilities/footer_spec.js
+8
-13
No files found.
ee/app/assets/javascripts/pages/projects/security/vulnerabilities/show/index.js
View file @
7a77698f
...
@@ -43,7 +43,8 @@ function createFooterApp() {
...
@@ -43,7 +43,8 @@ function createFooterApp() {
hasMr
,
hasMr
,
discussionsUrl
,
discussionsUrl
,
state
,
state
,
issueFeedback
:
feedback
,
issueFeedback
,
mergeRequestFeedback
,
notesUrl
,
notesUrl
,
project
,
project
,
remediations
,
remediations
,
...
@@ -68,7 +69,8 @@ function createFooterApp() {
...
@@ -68,7 +69,8 @@ function createFooterApp() {
vulnerabilityFeedbackHelpPath
,
vulnerabilityFeedbackHelpPath
,
isStandaloneVulnerability
:
true
,
isStandaloneVulnerability
:
true
,
},
},
feedback
,
issueFeedback
,
mergeRequestFeedback
,
project
:
{
project
:
{
url
:
project
.
full_path
,
url
:
project
.
full_path
,
value
:
project
.
full_name
,
value
:
project
.
full_name
,
...
...
ee/app/assets/javascripts/vulnerabilities/components/footer.vue
View file @
7a77698f
...
@@ -30,6 +30,16 @@ export default {
...
@@ -30,6 +30,16 @@ export default {
type
:
Object
,
type
:
Object
,
required
:
true
,
required
:
true
,
},
},
issueFeedback
:
{
type
:
Object
,
required
:
false
,
default
:
()
=>
null
,
},
mergeRequestFeedback
:
{
type
:
Object
,
required
:
false
,
default
:
()
=>
null
,
},
},
},
data
:
()
=>
({
data
:
()
=>
({
...
@@ -150,16 +160,16 @@ export default {
...
@@ -150,16 +160,16 @@ export default {
<div
data-qa-selector=
"vulnerability_footer"
>
<div
data-qa-selector=
"vulnerability_footer"
>
<solution-card
v-if=
"hasSolution"
v-bind=
"solutionInfo"
/>
<solution-card
v-if=
"hasSolution"
v-bind=
"solutionInfo"
/>
<div
v-if=
"
project.issue_feedback || project.merge_request_f
eedback"
class=
"card"
>
<div
v-if=
"
issueFeedback || mergeRequestF
eedback"
class=
"card"
>
<issue-note
<issue-note
v-if=
"
project.issue_f
eedback"
v-if=
"
issueF
eedback"
:feedback=
"
project.issue_f
eedback"
:feedback=
"
issueF
eedback"
:project=
"project"
:project=
"project"
class=
"card-body"
class=
"card-body"
/>
/>
<merge-request-note
<merge-request-note
v-if=
"
project.merge_request_f
eedback"
v-if=
"
mergeRequestF
eedback"
:feedback=
"
project.merge_request_f
eedback"
:feedback=
"
mergeRequestF
eedback"
:project=
"project"
:project=
"project"
class=
"card-body"
class=
"card-body"
/>
/>
...
...
ee/spec/frontend/vulnerabilities/footer_spec.js
View file @
7a77698f
...
@@ -29,11 +29,10 @@ describe('Vulnerability Footer', () => {
...
@@ -29,11 +29,10 @@ describe('Vulnerability Footer', () => {
},
},
finding
:
{},
finding
:
{},
notesUrl
:
'
/notes
'
,
notesUrl
:
'
/notes
'
,
};
project
:
{
full_path
:
'
/root/security-reports
'
,
const
project
=
{
full_name
:
'
Administrator / Security Reports
'
,
full_path
:
'
/root/security-reports
'
,
},
full_name
:
'
Administrator / Security Reports
'
,
};
};
const
solutionInfoProp
=
{
const
solutionInfoProp
=
{
...
@@ -81,22 +80,18 @@ describe('Vulnerability Footer', () => {
...
@@ -81,22 +80,18 @@ describe('Vulnerability Footer', () => {
});
});
describe
.
each
`
describe
.
each
`
type | prop
| component
type | prop | component
${
'
issue
'
}
|
${
'
issue
_feedback
'
}
|
${
IssueNote
}
${
'
issue
'
}
|
${
'
issue
Feedback
'
}
|
${
IssueNote
}
${
'
merge request
'
}
|
${
'
merge
_request_f
eedback
'
}
|
${
MergeRequestNote
}
${
'
merge request
'
}
|
${
'
merge
RequestF
eedback
'
}
|
${
MergeRequestNote
}
`
(
'
$type note
'
,
({
prop
,
component
})
=>
{
`
(
'
$type note
'
,
({
prop
,
component
})
=>
{
// The object itself does not matter, we just want to make sure it's passed to the issue note.
// The object itself does not matter, we just want to make sure it's passed to the issue note.
const
feedback
=
{};
const
feedback
=
{};
it
(
'
shows issue note when an issue exists for the vulnerability
'
,
()
=>
{
it
(
'
shows issue note when an issue exists for the vulnerability
'
,
()
=>
{
createWrapper
({
...
minimumProps
,
finding
:
{
project
,
[
prop
]:
feedback
}
});
createWrapper
({
...
minimumProps
,
[
prop
]:
feedback
});
expect
(
wrapper
.
contains
(
component
)).
toBe
(
true
);
expect
(
wrapper
.
contains
(
component
)).
toBe
(
true
);
expect
(
wrapper
.
find
(
component
).
props
()).
toMatchObject
({
expect
(
wrapper
.
find
(
component
).
props
()).
toMatchObject
({
feedback
,
feedback
,
project
:
{
url
:
project
.
full_path
,
value
:
project
.
full_name
,
},
});
});
});
});
...
...
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