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
5711ad70
Commit
5711ad70
authored
Apr 22, 2021
by
Savas Vedova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement code review suggestion
parent
2a7944e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
ee/spec/frontend/security_dashboard/components/vulnerability_count_list_spec.js
...ity_dashboard/components/vulnerability_count_list_spec.js
+6
-14
No files found.
ee/spec/frontend/security_dashboard/components/vulnerability_count_list_spec.js
View file @
5711ad70
...
...
@@ -92,28 +92,20 @@ describe('Vulnerabilities count list component', () => {
});
describe
.
each
`
dashboardType |
fullPath
| expectedContainedQueryVariables
${
DASHBOARD_TYPES
.
INSTANCE
}
|
${
undefined
}
|
${{
isInstance
:
true
,
isGroup
:
false
,
isProject
:
false
}
}
${
DASHBOARD_TYPES
.
GROUP
}
|
${
'
group/path
'
}
|
${{
isInstance
:
false
,
isGroup
:
true
,
isProject
:
false
}
}
${
DASHBOARD_TYPES
.
PROJECT
}
|
${
'
project/path
'
}
|
${{
isInstance
:
false
,
isGroup
:
false
,
isProject
:
true
}
}
dashboardType |
provide
| expectedContainedQueryVariables
${
DASHBOARD_TYPES
.
INSTANCE
}
|
${
undefined
}
|
${{
isInstance
:
true
,
isGroup
:
false
,
isProject
:
false
}
}
${
DASHBOARD_TYPES
.
GROUP
}
|
${
{
groupFullPath
:
'
group/path
'
}
}
|
${{
isInstance
:
false
,
isGroup
:
true
,
isProject
:
false
}
}
${
DASHBOARD_TYPES
.
PROJECT
}
|
${
{
projectFullPath
:
'
project/path
'
}
} |
${{
isInstance
:
false
,
isGroup
:
false
,
isProject
:
true
}
}
`
(
'
when the dashboard type is $dashboardType
'
,
({
dashboardType
,
fullPath
,
expectedContainedQueryVariables
})
=>
{
({
dashboardType
,
provide
,
expectedContainedQueryVariables
})
=>
{
beforeEach
(()
=>
{
const
mockResponse
=
jest
.
fn
()
.
mockResolvedValue
(
mockVulnerabilitySeveritiesGraphQLResponse
({
dashboardType
}));
const
provide
=
{
dashboardType
,
groupFullPath
:
undefined
,
projectFullPath
:
undefined
};
if
(
expectedContainedQueryVariables
.
isGroup
)
{
provide
.
groupFullPath
=
fullPath
;
}
else
if
(
expectedContainedQueryVariables
.
isProject
)
{
provide
.
projectFullPath
=
fullPath
;
}
createWrapperWithApollo
({
provide
,
provide
:
{
dashboardType
,
...
provide
}
,
propsData
:
{
filters
:
{
someFilter
:
1
}
},
query
:
mockResponse
,
stubs
:
{
VulnerabilityCountListLayout
},
...
...
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