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
ca726db0
Commit
ca726db0
authored
Oct 14, 2020
by
Brandon Labuschagne
Committed by
Jacques Erasmus
Oct 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Project search should differentiate between projects with the same name
parent
a6b5e4cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
1 deletion
+39
-1
ee/app/assets/javascripts/analytics/shared/components/projects_dropdown_filter.vue
.../analytics/shared/components/projects_dropdown_filter.vue
+4
-1
ee/changelogs/unreleased/249594-vsa-project-search-should-differentiate-between-projects-with-t.yml
...t-search-should-differentiate-between-projects-with-t.yml
+5
-0
ee/spec/frontend/analytics/shared/components/projects_dropdown_filter_spec.js
...lytics/shared/components/projects_dropdown_filter_spec.js
+30
-0
No files found.
ee/app/assets/javascripts/analytics/shared/components/projects_dropdown_filter.vue
View file @
ca726db0
...
@@ -201,7 +201,10 @@ export default {
...
@@ -201,7 +201,10 @@ export default {
:src=
"project.avatarUrl"
:src=
"project.avatarUrl"
shape=
"rect"
shape=
"rect"
/>
/>
{{ project.name }}
<div>
<div
data-testid=
"project-name"
>
{{ project.name }}
</div>
<div
class=
"gl-text-gray-500"
data-testid=
"project-full-path"
>
{{ project.fullPath }}
</div>
</div>
</div>
</div>
</gl-dropdown-item>
</gl-dropdown-item>
<gl-dropdown-item
v-show=
"noResultsAvailable"
class=
"gl-pointer-events-none text-secondary"
>
{{
<gl-dropdown-item
v-show=
"noResultsAvailable"
class=
"gl-pointer-events-none text-secondary"
>
{{
...
...
ee/changelogs/unreleased/249594-vsa-project-search-should-differentiate-between-projects-with-t.yml
0 → 100644
View file @
ca726db0
---
title
:
Add project full path to analytics project dropdown filter
merge_request
:
45020
author
:
type
:
changed
ee/spec/frontend/analytics/shared/components/projects_dropdown_filter_spec.js
View file @
ca726db0
...
@@ -69,6 +69,11 @@ describe('ProjectsDropdownFilter component', () => {
...
@@ -69,6 +69,11 @@ describe('ProjectsDropdownFilter component', () => {
const
findDropdownButtonIdentIconAtIndex
=
index
=>
const
findDropdownButtonIdentIconAtIndex
=
index
=>
findDropdownAtIndex
(
index
).
find
(
'
div.gl-avatar-identicon
'
);
findDropdownAtIndex
(
index
).
find
(
'
div.gl-avatar-identicon
'
);
const
findDropdownNameAtIndex
=
index
=>
findDropdownAtIndex
(
index
).
find
(
'
[data-testid="project-name"
'
);
const
findDropdownFullPathAtIndex
=
index
=>
findDropdownAtIndex
(
index
).
find
(
'
[data-testid="project-full-path"]
'
);
const
selectDropdownItemAtIndex
=
index
=>
const
selectDropdownItemAtIndex
=
index
=>
findDropdownAtIndex
(
index
)
findDropdownAtIndex
(
index
)
.
find
(
'
button
'
)
.
find
(
'
button
'
)
...
@@ -137,10 +142,23 @@ describe('ProjectsDropdownFilter component', () => {
...
@@ -137,10 +142,23 @@ describe('ProjectsDropdownFilter component', () => {
expect
(
findDropdownButtonAvatarAtIndex
(
0
).
exists
()).
toBe
(
true
);
expect
(
findDropdownButtonAvatarAtIndex
(
0
).
exists
()).
toBe
(
true
);
expect
(
findDropdownButtonIdentIconAtIndex
(
0
).
exists
()).
toBe
(
false
);
expect
(
findDropdownButtonIdentIconAtIndex
(
0
).
exists
()).
toBe
(
false
);
});
});
it
(
"
renders an identicon when the project doesn't have an avatarUrl
"
,
()
=>
{
it
(
"
renders an identicon when the project doesn't have an avatarUrl
"
,
()
=>
{
expect
(
findDropdownButtonAvatarAtIndex
(
1
).
exists
()).
toBe
(
false
);
expect
(
findDropdownButtonAvatarAtIndex
(
1
).
exists
()).
toBe
(
false
);
expect
(
findDropdownButtonIdentIconAtIndex
(
1
).
exists
()).
toBe
(
true
);
expect
(
findDropdownButtonIdentIconAtIndex
(
1
).
exists
()).
toBe
(
true
);
});
});
it
(
'
renders the project name
'
,
()
=>
{
projects
.
forEach
((
project
,
index
)
=>
{
expect
(
findDropdownNameAtIndex
(
index
).
text
()).
toBe
(
project
.
name
);
});
});
it
(
'
renders the project fullPath
'
,
()
=>
{
projects
.
forEach
((
project
,
index
)
=>
{
expect
(
findDropdownFullPathAtIndex
(
index
).
text
()).
toBe
(
project
.
fullPath
);
});
});
});
});
describe
(
'
on project click
'
,
()
=>
{
describe
(
'
on project click
'
,
()
=>
{
...
@@ -202,6 +220,18 @@ describe('ProjectsDropdownFilter component', () => {
...
@@ -202,6 +220,18 @@ describe('ProjectsDropdownFilter component', () => {
expect
(
findDropdownButtonAvatarAtIndex
(
1
).
exists
()).
toBe
(
false
);
expect
(
findDropdownButtonAvatarAtIndex
(
1
).
exists
()).
toBe
(
false
);
expect
(
findDropdownButtonIdentIconAtIndex
(
1
).
exists
()).
toBe
(
true
);
expect
(
findDropdownButtonIdentIconAtIndex
(
1
).
exists
()).
toBe
(
true
);
});
});
it
(
'
renders the project name
'
,
()
=>
{
projects
.
forEach
((
project
,
index
)
=>
{
expect
(
findDropdownNameAtIndex
(
index
).
text
()).
toBe
(
project
.
name
);
});
});
it
(
'
renders the project fullPath
'
,
()
=>
{
projects
.
forEach
((
project
,
index
)
=>
{
expect
(
findDropdownFullPathAtIndex
(
index
).
text
()).
toBe
(
project
.
fullPath
);
});
});
});
});
describe
(
'
on project click
'
,
()
=>
{
describe
(
'
on project click
'
,
()
=>
{
...
...
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