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
7eba40d3
Commit
7eba40d3
authored
Jul 24, 2020
by
Savas Vedova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement code review suggestions
parent
dbeea6c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
ee/spec/frontend/security_dashboard/components/vulnerability_count_list_layout_spec.js
...hboard/components/vulnerability_count_list_layout_spec.js
+21
-1
ee/spec/frontend/security_dashboard/components/vulnerability_count_list_spec.js
...ity_dashboard/components/vulnerability_count_list_spec.js
+4
-0
No files found.
ee/spec/frontend/security_dashboard/components/vulnerability_count_list_layout_spec.js
View file @
7eba40d3
...
...
@@ -32,8 +32,28 @@ describe('Vulnerabilities count list component', () => {
});
});
describe
(
'
when there are no counts
'
,
()
=>
{
beforeEach
(()
=>
{
wrapper
=
createWrapper
({
propsData
:
{
vulnerabilitiesCount
:
{}
}
});
});
it
.
each
`
index | name
${
0
}
|
${
'
critical
'
}
${
1
}
|
${
'
high
'
}
${
2
}
|
${
'
medium
'
}
${
3
}
|
${
'
low
'
}
${
4
}
|
${
'
info
'
}
${
5
}
|
${
'
unknown
'
}
`
(
'
shows 0 count for $name
'
,
({
index
,
name
})
=>
{
const
vulnerability
=
findVulnerability
().
at
(
index
);
expect
(
vulnerability
.
props
(
'
severity
'
)).
toBe
(
name
);
expect
(
vulnerability
.
props
(
'
count
'
)).
toBe
(
0
);
});
});
describe
(
'
when loaded and has a list of vulnerability counts
'
,
()
=>
{
const
vulnerabilitiesCount
=
{
critical
:
5
,
medium
:
3
,
info
:
1
,
unknown
:
2
,
low
:
0
,
high
:
0
};
const
vulnerabilitiesCount
=
{
critical
:
5
,
medium
:
3
,
info
:
1
,
unknown
:
2
,
low
:
3
,
high
:
8
};
beforeEach
(()
=>
{
wrapper
=
createWrapper
({
propsData
:
{
vulnerabilitiesCount
}
});
...
...
ee/spec/frontend/security_dashboard/components/vulnerability_count_list_spec.js
View file @
7eba40d3
...
...
@@ -38,6 +38,8 @@ describe('Vulnerabilities count list component', () => {
high
:
3
,
low
:
19
,
info
:
4
,
medium
:
2
,
unknown
:
4
,
},
});
});
...
...
@@ -52,6 +54,8 @@ describe('Vulnerabilities count list component', () => {
high
:
3
,
low
:
19
,
info
:
4
,
medium
:
2
,
unknown
:
4
,
});
});
});
...
...
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