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
e259b614
Commit
e259b614
authored
Jul 22, 2020
by
Savas Vedova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not display the export button while loading
parent
111b6286
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
8 deletions
+26
-8
ee/app/assets/javascripts/security_dashboard/components/first_class_instance_security_dashboard.vue
...rd/components/first_class_instance_security_dashboard.vue
+1
-1
ee/changelogs/unreleased/228891-fix-export-button-showing-up-while-loading.yml
...sed/228891-fix-export-button-showing-up-while-loading.yml
+5
-0
ee/spec/frontend/security_dashboard/components/first_class_instance_security_dashboard_spec.js
...omponents/first_class_instance_security_dashboard_spec.js
+20
-7
No files found.
ee/app/assets/javascripts/security_dashboard/components/first_class_instance_security_dashboard.vue
View file @
e259b614
...
...
@@ -102,7 +102,7 @@ export default {
<header
class=
"page-title-holder flex-fill d-flex align-items-center"
>
<h2
class=
"page-title flex-grow"
>
{{
s__
(
'
SecurityReports|Security Dashboard
'
)
}}
</h2>
<csv-export-button
v-if=
"
!shouldShowEmptyState
"
v-if=
"
shouldShowDashboard
"
:vulnerabilities-export-endpoint=
"vulnerabilitiesExportEndpoint"
/>
<gl-button
...
...
ee/changelogs/unreleased/228891-fix-export-button-showing-up-while-loading.yml
0 → 100644
View file @
e259b614
---
title
:
Do not display the export button while projects are loading
merge_request
:
37573
author
:
type
:
fixed
ee/spec/frontend/security_dashboard/components/first_class_instance_security_dashboard_spec.js
View file @
e259b614
...
...
@@ -13,7 +13,9 @@ import DashboardNotConfigured from 'ee/security_dashboard/components/empty_state
describe
(
'
First Class Instance Dashboard Component
'
,
()
=>
{
let
wrapper
;
const
defaultMocks
=
{
$apollo
:
{
queries
:
{
projects
:
{
loading
:
false
}
}
}
};
const
defaultMocks
=
({
loading
=
false
}
=
{})
=>
({
$apollo
:
{
queries
:
{
projects
:
{
loading
}
}
},
});
const
vulnerableProjectsEndpoint
=
'
/vulnerable/projects
'
;
const
vulnerabilitiesExportEndpoint
=
'
/vulnerabilities/exports
'
;
...
...
@@ -26,12 +28,12 @@ describe('First Class Instance Dashboard Component', () => {
const
findEmptyState
=
()
=>
wrapper
.
find
(
DashboardNotConfigured
);
const
findFilters
=
()
=>
wrapper
.
find
(
Filters
);
const
createWrapper
=
({
data
=
{},
stubs
})
=>
{
const
createWrapper
=
({
data
=
{},
stubs
,
mocks
=
defaultMocks
()
})
=>
{
return
shallowMount
(
FirstClassInstanceDashboard
,
{
data
()
{
return
{
...
data
};
},
mocks
:
{
...
defaultMocks
}
,
mocks
,
propsData
:
{
vulnerableProjectsEndpoint
,
vulnerabilitiesExportEndpoint
,
...
...
@@ -91,15 +93,26 @@ describe('First Class Instance Dashboard Component', () => {
});
});
describe
(
'
when loading projects
'
,
()
=>
{
beforeEach
(()
=>
{
wrapper
=
createWrapper
({
mocks
:
defaultMocks
({
loading
:
true
}),
data
:
{
projects
:
[{
id
:
1
}],
},
});
});
it
(
'
does not render the export button
'
,
()
=>
{
expect
(
findCsvExportButton
().
exists
()).
toBe
(
false
);
});
});
describe
(
'
when uninitialized
'
,
()
=>
{
beforeEach
(()
=>
{
wrapper
=
createWrapper
({
data
:
{
isManipulatingProjects
:
false
,
stubs
:
{
DashboardNotConfigured
,
GlButton
,
},
},
});
});
...
...
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