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
66ed49c5
Commit
66ed49c5
authored
Sep 16, 2019
by
Brandon Labuschagne
Committed by
Kushal Pandya
Sep 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix analytics dropdown deselect bug
parent
2d58bd00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
ee/app/assets/javascripts/analytics/shared/components/projects_dropdown_filter.vue
.../analytics/shared/components/projects_dropdown_filter.vue
+4
-1
ee/spec/frontend/analytics/shared/components/projects_dropdown_filter_spec.js
...lytics/shared/components/projects_dropdown_filter_spec.js
+17
-0
No files found.
ee/app/assets/javascripts/analytics/shared/components/projects_dropdown_filter.vue
View file @
66ed49c5
...
...
@@ -80,10 +80,13 @@ export default {
?
this
.
selectedProjects
.
concat
([
selectedProject
])
:
this
.
selectedProjects
.
filter
(
project
=>
project
.
id
!==
selectedProject
.
id
);
},
singleSelectedProject
(
selectedObj
,
isMarking
)
{
return
isMarking
?
[
selectedObj
]
:
[];
},
setSelectedProjects
(
selectedObj
,
isMarking
)
{
this
.
selectedProjects
=
this
.
multiSelect
?
this
.
getSelectedProjects
(
selectedObj
,
isMarking
)
:
[
selectedObj
]
;
:
this
.
singleSelectedProject
(
selectedObj
,
isMarking
)
;
},
onClick
({
selectedObj
,
e
,
isMarking
})
{
e
.
preventDefault
();
...
...
ee/spec/frontend/analytics/shared/components/projects_dropdown_filter_spec.js
View file @
66ed49c5
...
...
@@ -141,6 +141,23 @@ describe('ProjectsDropdownFilter component', () => {
]);
});
it
(
'
selection should be emptied when a project is deselected
'
,
()
=>
{
const
project
=
findDropdownItems
().
at
(
0
);
project
.
trigger
(
'
click
'
);
project
.
trigger
(
'
click
'
);
expect
(
wrapper
.
emittedByOrder
()).
toEqual
([
{
name
:
'
selected
'
,
args
:
[[
projects
[
0
]]],
},
{
name
:
'
selected
'
,
args
:
[[]],
},
]);
});
it
(
'
renders an avatar in the dropdown button when the project has an avatar_url
'
,
done
=>
{
findDropdownItems
()
.
at
(
0
)
...
...
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