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
759ad2d9
Commit
759ad2d9
authored
Jun 23, 2020
by
Adam Alvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed failing tests
updated toEqual checks to toBe when comparing simple values
parent
771ce695
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
ee/spec/frontend/security_dashboard/components/empty_states/first_class_instance_security_dashboard_spec.js
...ty_states/first_class_instance_security_dashboard_spec.js
+3
-3
ee/spec/frontend/security_dashboard/components/first_class_instance_security_dashboard_spec.js
...omponents/first_class_instance_security_dashboard_spec.js
+8
-4
No files found.
ee/spec/frontend/security_dashboard/components/empty_states/first_class_instance_security_dashboard_spec.js
View file @
759ad2d9
...
...
@@ -31,15 +31,15 @@ describe('first class instance security dashboard empty state', () => {
});
it
(
'
contains a GlEmptyState
'
,
()
=>
{
expect
(
findGlEmptyState
().
exists
()).
to
Equal
(
true
);
expect
(
findGlEmptyState
().
exists
()).
to
Be
(
true
);
});
it
(
'
contains a GlLink with href attribute equal to dashboardDocumentation
'
,
()
=>
{
expect
(
findLink
().
attributes
(
'
href
'
)).
to
Equal
(
dashboardDocumentation
);
expect
(
findLink
().
attributes
(
'
href
'
)).
to
Be
(
dashboardDocumentation
);
});
it
(
'
contains a GlButton
'
,
()
=>
{
expect
(
findButton
().
exists
()).
to
Equal
(
true
);
expect
(
findButton
().
exists
()).
to
Be
(
true
);
});
it
(
'
emits `handleAddProjectsClick` on button click
'
,
async
()
=>
{
...
...
ee/spec/frontend/security_dashboard/components/first_class_instance_security_dashboard_spec.js
View file @
759ad2d9
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
Gl
EmptyState
,
Gl
Button
}
from
'
@gitlab/ui
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
SecurityDashboardLayout
from
'
ee/security_dashboard/components/security_dashboard_layout.vue
'
;
import
FirstClassInstanceDashboard
from
'
ee/security_dashboard/components/first_class_instance_security_dashboard.vue
'
;
import
FirstClassInstanceVulnerabilities
from
'
ee/security_dashboard/components/first_class_instance_security_dashboard_vulnerabilities.vue
'
;
...
...
@@ -8,6 +8,7 @@ import VulnerabilityChart from 'ee/security_dashboard/components/first_class_vul
import
CsvExportButton
from
'
ee/security_dashboard/components/csv_export_button.vue
'
;
import
Filters
from
'
ee/security_dashboard/components/first_class_vulnerability_filters.vue
'
;
import
ProjectManager
from
'
ee/security_dashboard/components/first_class_project_manager/project_manager.vue
'
;
import
EmptyState
from
'
ee/security_dashboard/components/empty_states/first_class_instance_security_dashboard.vue
'
;
describe
(
'
First Class Instance Dashboard Component
'
,
()
=>
{
let
wrapper
;
...
...
@@ -24,7 +25,7 @@ describe('First Class Instance Dashboard Component', () => {
const
findVulnerabilityChart
=
()
=>
wrapper
.
find
(
VulnerabilityChart
);
const
findCsvExportButton
=
()
=>
wrapper
.
find
(
CsvExportButton
);
const
findProjectManager
=
()
=>
wrapper
.
find
(
ProjectManager
);
const
findEmptyState
=
()
=>
wrapper
.
find
(
Gl
EmptyState
);
const
findEmptyState
=
()
=>
wrapper
.
find
(
EmptyState
);
const
findFilters
=
()
=>
wrapper
.
find
(
Filters
);
const
createWrapper
=
({
data
=
{},
stubs
})
=>
{
...
...
@@ -102,7 +103,7 @@ describe('First Class Instance Dashboard Component', () => {
data
:
{
isManipulatingProjects
:
false
,
stubs
:
{
Gl
EmptyState
,
EmptyState
,
GlButton
,
},
},
...
...
@@ -110,7 +111,10 @@ describe('First Class Instance Dashboard Component', () => {
});
it
(
'
renders the empty state
'
,
()
=>
{
expect
(
findEmptyState
().
props
(
'
title
'
)).
toBe
(
'
Add a project to your dashboard
'
);
expect
(
findEmptyState
().
props
()).
toEqual
({
svgPath
:
emptyStateSvgPath
,
dashboardDocumentation
,
});
});
it
(
'
does not render the vulnerability list
'
,
()
=>
{
...
...
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