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
8709fb53
Commit
8709fb53
authored
Aug 21, 2020
by
Justin Ho Tuan Duong
Committed by
Ezekiel Kigbo
Aug 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace fa-tag(s) with GitLab SVG tag icon
- Fix tag/branch icon too close to text on Pipelines list page
parent
3cb408f1
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
43 additions
and
24 deletions
+43
-24
app/assets/javascripts/sidebar/components/assignees/collapsed_assignee_list.vue
.../sidebar/components/assignees/collapsed_assignee_list.vue
+3
-2
app/assets/javascripts/sidebar/components/participants/participants.vue
...ascripts/sidebar/components/participants/participants.vue
+3
-2
app/assets/javascripts/vue_shared/components/sidebar/collapsed_calendar_icon.vue
...vue_shared/components/sidebar/collapsed_calendar_icon.vue
+5
-1
app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue
...onents/sidebar/labels_select/dropdown_value_collapsed.vue
+5
-1
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+2
-2
app/assets/stylesheets/pages/pipelines.scss
app/assets/stylesheets/pages/pipelines.scss
+0
-1
app/views/projects/tags/_tag.html.haml
app/views/projects/tags/_tag.html.haml
+2
-2
app/views/projects/tags/show.html.haml
app/views/projects/tags/show.html.haml
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+6
-6
app/views/shared/issuable/_sidebar_assignees.html.haml
app/views/shared/issuable/_sidebar_assignees.html.haml
+1
-1
app/views/users/show.html.haml
app/views/users/show.html.haml
+1
-1
changelogs/unreleased/225926-replace-fa-tag-and-sidebar-icons.yml
...gs/unreleased/225926-replace-fa-tag-and-sidebar-icons.yml
+5
-0
ee/spec/features/epics/epic_labels_spec.rb
ee/spec/features/epics/epic_labels_spec.rb
+1
-1
spec/frontend/sidebar/assignees_spec.js
spec/frontend/sidebar/assignees_spec.js
+4
-1
spec/frontend/sidebar/components/assignees/collapsed_assignee_list_spec.js
...ebar/components/assignees/collapsed_assignee_list_spec.js
+3
-1
spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed_spec.js
...ts/sidebar/labels_select/dropdown_value_collapsed_spec.js
+1
-1
No files found.
app/assets/javascripts/sidebar/components/assignees/collapsed_assignee_list.vue
View file @
8709fb53
<
script
>
<
script
>
import
{
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
Gl
Icon
,
Gl
TooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
import
CollapsedAssignee
from
'
./collapsed_assignee.vue
'
;
import
CollapsedAssignee
from
'
./collapsed_assignee.vue
'
;
...
@@ -12,6 +12,7 @@ export default {
...
@@ -12,6 +12,7 @@ export default {
},
},
components
:
{
components
:
{
CollapsedAssignee
,
CollapsedAssignee
,
GlIcon
,
},
},
props
:
{
props
:
{
users
:
{
users
:
{
...
@@ -102,7 +103,7 @@ export default {
...
@@ -102,7 +103,7 @@ export default {
:title="tooltipTitle"
:title="tooltipTitle"
class="sidebar-collapsed-icon sidebar-collapsed-user"
class="sidebar-collapsed-icon sidebar-collapsed-user"
>
>
<
i
v-if=
"hasNoUsers"
:aria-label=
"__('None')"
class=
"fa fa-user"
>
</i
>
<
gl-icon
v-if=
"hasNoUsers"
name=
"user"
:aria-label=
"__('None')"
/
>
<collapsed-assignee
<collapsed-assignee
v-for=
"user in collapsedUsers"
v-for=
"user in collapsedUsers"
:key=
"user.id"
:key=
"user.id"
...
...
app/assets/javascripts/sidebar/components/participants/participants.vue
View file @
8709fb53
<
script
>
<
script
>
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
Gl
Icon
,
Gl
LoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
__
,
n__
,
sprintf
}
from
'
~/locale
'
;
import
{
__
,
n__
,
sprintf
}
from
'
~/locale
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
userAvatarImage
from
'
~/vue_shared/components/user_avatar/user_avatar_image.vue
'
;
import
userAvatarImage
from
'
~/vue_shared/components/user_avatar/user_avatar_image.vue
'
;
...
@@ -10,6 +10,7 @@ export default {
...
@@ -10,6 +10,7 @@ export default {
},
},
components
:
{
components
:
{
userAvatarImage
,
userAvatarImage
,
GlIcon
,
GlLoadingIcon
,
GlLoadingIcon
,
},
},
props
:
{
props
:
{
...
@@ -94,7 +95,7 @@ export default {
...
@@ -94,7 +95,7 @@ export default {
data-boundary=
"viewport"
data-boundary=
"viewport"
@
click=
"onClickCollapsedIcon"
@
click=
"onClickCollapsedIcon"
>
>
<
i
class=
"fa fa-users"
aria-hidden=
"true"
>
</i
>
<
gl-icon
name=
"users"
/
>
<gl-loading-icon
v-if=
"loading"
/>
<gl-loading-icon
v-if=
"loading"
/>
<span
v-else
data-testid=
"collapsed-count"
>
{{
participantCount
}}
</span>
<span
v-else
data-testid=
"collapsed-count"
>
{{
participantCount
}}
</span>
</div>
</div>
...
...
app/assets/javascripts/vue_shared/components/sidebar/collapsed_calendar_icon.vue
View file @
8709fb53
<
script
>
<
script
>
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
export
default
{
export
default
{
...
@@ -6,6 +7,9 @@ export default {
...
@@ -6,6 +7,9 @@ export default {
directives
:
{
directives
:
{
tooltip
,
tooltip
,
},
},
components
:
{
GlIcon
,
},
props
:
{
props
:
{
containerClass
:
{
containerClass
:
{
type
:
String
,
type
:
String
,
...
@@ -47,7 +51,7 @@ export default {
...
@@ -47,7 +51,7 @@ export default {
data-boundary=
"viewport"
data-boundary=
"viewport"
@
click=
"click"
@
click=
"click"
>
>
<
i
v-if=
"showIcon"
class=
"fa fa-calendar"
aria-hidden=
"true"
>
</i
>
<
gl-icon
v-if=
"showIcon"
name=
"calendar"
/
>
<slot>
<slot>
<span>
{{
text
}}
</span>
<span>
{{
text
}}
</span>
</slot>
</slot>
...
...
app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue
View file @
8709fb53
<
script
>
<
script
>
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
s__
,
sprintf
}
from
'
~/locale
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
...
@@ -6,6 +7,9 @@ export default {
...
@@ -6,6 +7,9 @@ export default {
directives
:
{
directives
:
{
tooltip
,
tooltip
,
},
},
components
:
{
GlIcon
,
},
props
:
{
props
:
{
labels
:
{
labels
:
{
type
:
Array
,
type
:
Array
,
...
@@ -49,7 +53,7 @@ export default {
...
@@ -49,7 +53,7 @@ export default {
data-boundary=
"viewport"
data-boundary=
"viewport"
@
click=
"handleClick"
@
click=
"handleClick"
>
>
<
i
aria-hidden=
"true"
data-hidden=
"true"
class=
"fa fa-tags"
>
</i
>
<
gl-icon
name=
"labels"
/
>
<span>
{{
labels
.
length
}}
</span>
<span>
{{
labels
.
length
}}
</span>
</div>
</div>
</
template
>
</
template
>
app/assets/stylesheets/pages/issuable.scss
View file @
8709fb53
...
@@ -234,8 +234,8 @@
...
@@ -234,8 +234,8 @@
.title
{
.title
{
color
:
$gl-text-color
;
color
:
$gl-text-color
;
margin-bottom
:
$gl-padding-
8
;
margin-bottom
:
$gl-padding-
4
;
line-height
:
1
;
line-height
:
$gl-line-height-20
;
.avatar
{
.avatar
{
margin-left
:
0
;
margin-left
:
0
;
...
...
app/assets/stylesheets/pages/pipelines.scss
View file @
8709fb53
...
@@ -193,7 +193,6 @@
...
@@ -193,7 +193,6 @@
.icon-container
{
.icon-container
{
display
:
inline-block
;
display
:
inline-block
;
width
:
10px
;
&
.commit-icon
{
&
.commit-icon
{
width
:
15px
;
width
:
15px
;
...
...
app/views/projects/tags/_tag.html.haml
View file @
8709fb53
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
-
release
=
@releases
.
find
{
|
release
|
release
.
tag
==
tag
.
name
}
-
release
=
@releases
.
find
{
|
release
|
release
.
tag
==
tag
.
name
}
%li
.flex-row.allow-wrap
%li
.flex-row.allow-wrap
.row-main-content
.row-main-content
=
icon
(
'tag'
)
=
sprite_
icon
(
'tag'
)
=
link_to
tag
.
name
,
project_tag_path
(
@project
,
tag
.
name
),
class:
'item-title ref-name
gl-ml-2
'
=
link_to
tag
.
name
,
project_tag_path
(
@project
,
tag
.
name
),
class:
'item-title ref-name'
-
if
protected_tag?
(
@project
,
tag
)
-
if
protected_tag?
(
@project
,
tag
)
%span
.badge.badge-success.gl-ml-2
%span
.badge.badge-success.gl-ml-2
...
...
app/views/projects/tags/show.html.haml
View file @
8709fb53
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
.nav-text
.nav-text
.title
.title
%span
.item-title.ref-name
{
data:
{
qa_selector:
'tag_name_content'
}
}
%span
.item-title.ref-name
{
data:
{
qa_selector:
'tag_name_content'
}
}
=
icon
(
'tag'
)
=
sprite_
icon
(
'tag'
)
=
@tag
.
name
=
@tag
.
name
-
if
protected_tag?
(
@project
,
@tag
)
-
if
protected_tag?
(
@project
,
@tag
)
%span
.badge.badge-success
%span
.badge.badge-success
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
8709fb53
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
=
_
(
'None'
)
=
_
(
'None'
)
.title.hide-collapsed
.title.hide-collapsed
=
_
(
'Milestone'
)
=
_
(
'Milestone'
)
=
icon
(
'spinner spin'
,
class:
'hidden block-loading'
,
'aria-hidden'
:
'true
'
)
=
loading_icon
(
css_class:
'gl-vertical-align-text-bottom hidden block-loading
'
)
-
if
can_edit_issuable
-
if
can_edit_issuable
=
link_to
_
(
'Edit'
),
'#'
,
class:
'js-sidebar-dropdown-toggle edit-link float-right'
,
data:
{
qa_selector:
"edit_milestone_link"
,
track_label:
"right_sidebar"
,
track_property:
"milestone"
,
track_event:
"click_edit_button"
,
track_value:
""
}
=
link_to
_
(
'Edit'
),
'#'
,
class:
'js-sidebar-dropdown-toggle edit-link float-right'
,
data:
{
qa_selector:
"edit_milestone_link"
,
track_label:
"right_sidebar"
,
track_property:
"milestone"
,
track_event:
"click_edit_button"
,
track_value:
""
}
.value.hide-collapsed
.value.hide-collapsed
...
@@ -65,12 +65,12 @@
...
@@ -65,12 +65,12 @@
-
if
issuable_sidebar
.
has_key?
(
:due_date
)
-
if
issuable_sidebar
.
has_key?
(
:due_date
)
.block.due_date
.block.due_date
.sidebar-collapsed-icon.has-tooltip
{
data:
{
placement:
'left'
,
container:
'body'
,
html:
'true'
,
boundary:
'viewport'
},
title:
sidebar_due_date_tooltip_label
(
issuable_sidebar
[
:due_date
])
}
.sidebar-collapsed-icon.has-tooltip
{
data:
{
placement:
'left'
,
container:
'body'
,
html:
'true'
,
boundary:
'viewport'
},
title:
sidebar_due_date_tooltip_label
(
issuable_sidebar
[
:due_date
])
}
=
icon
(
'calendar'
,
'aria-hidden'
:
'true
'
)
=
sprite_icon
(
'calendar
'
)
%span
.js-due-date-sidebar-value
%span
.js-due-date-sidebar-value
=
issuable_sidebar
[
:due_date
].
try
(
:to_s
,
:medium
)
||
_
(
'None'
)
=
issuable_sidebar
[
:due_date
].
try
(
:to_s
,
:medium
)
||
_
(
'None'
)
.title.hide-collapsed
.title.hide-collapsed
=
_
(
'Due date'
)
=
_
(
'Due date'
)
=
icon
(
'spinner spin'
,
class:
'hidden block-loading'
,
'aria-hidden'
:
'true
'
)
=
loading_icon
(
css_class:
'gl-vertical-align-text-bottom hidden block-loading
'
)
-
if
can_edit_issuable
-
if
can_edit_issuable
=
link_to
_
(
'Edit'
),
'#'
,
class:
'js-sidebar-dropdown-toggle edit-link float-right'
,
data:
{
track_label:
"right_sidebar"
,
track_property:
"due_date"
,
track_event:
"click_edit_button"
,
track_value:
""
}
=
link_to
_
(
'Edit'
),
'#'
,
class:
'js-sidebar-dropdown-toggle edit-link float-right'
,
data:
{
track_label:
"right_sidebar"
,
track_property:
"due_date"
,
track_event:
"click_edit_button"
,
track_value:
""
}
.value.hide-collapsed
.value.hide-collapsed
...
@@ -101,12 +101,12 @@
...
@@ -101,12 +101,12 @@
-
selected_labels
=
issuable_sidebar
[
:labels
]
-
selected_labels
=
issuable_sidebar
[
:labels
]
.block.labels
.block.labels
.sidebar-collapsed-icon.js-sidebar-labels-tooltip
{
title:
issuable_labels_tooltip
(
selected_labels
),
data:
{
placement:
"left"
,
container:
"body"
,
boundary:
'viewport'
}
}
.sidebar-collapsed-icon.js-sidebar-labels-tooltip
{
title:
issuable_labels_tooltip
(
selected_labels
),
data:
{
placement:
"left"
,
container:
"body"
,
boundary:
'viewport'
}
}
=
icon
(
'tags'
,
'aria-hidden'
:
'true
'
)
=
sprite_icon
(
'labels
'
)
%span
%span
=
selected_labels
.
size
=
selected_labels
.
size
.title.hide-collapsed
.title.hide-collapsed
=
_
(
'Labels'
)
=
_
(
'Labels'
)
=
icon
(
'spinner spin'
,
class:
'hidden block-loading'
,
'aria-hidden'
:
'true
'
)
=
loading_icon
(
css_class:
'gl-vertical-align-text-bottom hidden block-loading
'
)
-
if
can_edit_issuable
-
if
can_edit_issuable
=
link_to
_
(
'Edit'
),
'#'
,
class:
'js-sidebar-dropdown-toggle edit-link float-right'
,
data:
{
qa_selector:
"edit_labels_link"
,
track_label:
"right_sidebar"
,
track_property:
"labels"
,
track_event:
"click_edit_button"
,
track_value:
""
}
=
link_to
_
(
'Edit'
),
'#'
,
class:
'js-sidebar-dropdown-toggle edit-link float-right'
,
data:
{
qa_selector:
"edit_labels_link"
,
track_label:
"right_sidebar"
,
track_property:
"labels"
,
track_event:
"click_edit_button"
,
track_value:
""
}
.value.issuable-show-labels.dont-hide.hide-collapsed
{
class:
(
"has-labels"
if
selected_labels
.
any?
),
data:
{
qa_selector:
'labels_block'
}
}
.value.issuable-show-labels.dont-hide.hide-collapsed
{
class:
(
"has-labels"
if
selected_labels
.
any?
),
data:
{
qa_selector:
'labels_block'
}
}
...
@@ -175,7 +175,7 @@
...
@@ -175,7 +175,7 @@
=
dropdown_footer
add_content_class:
true
do
=
dropdown_footer
add_content_class:
true
do
%button
.btn.btn-success.sidebar-move-issue-confirmation-button.js-move-issue-confirmation-button
{
type:
'button'
,
disabled:
true
}
%button
.btn.btn-success.sidebar-move-issue-confirmation-button.js-move-issue-confirmation-button
{
type:
'button'
,
disabled:
true
}
=
_
(
'Move'
)
=
_
(
'Move'
)
=
icon
(
'spinner spin'
,
class:
'
sidebar-move-issue-confirmation-loading-icon'
)
=
loading_icon
(
css_class:
'gl-vertical-align-text-bottom
sidebar-move-issue-confirmation-loading-icon'
)
-# haml-lint:disable InlineJavaScript
-# haml-lint:disable InlineJavaScript
%script
.js-sidebar-options
{
type:
"application/json"
}=
issuable_sidebar_options
(
issuable_sidebar
).
to_json
.
html_safe
%script
.js-sidebar-options
{
type:
"application/json"
}=
issuable_sidebar_options
(
issuable_sidebar
).
to_json
.
html_safe
app/views/shared/issuable/_sidebar_assignees.html.haml
View file @
8709fb53
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#js-vue-sidebar-assignees
{
data:
{
field:
issuable_type
,
signed_in:
signed_in
}
}
#js-vue-sidebar-assignees
{
data:
{
field:
issuable_type
,
signed_in:
signed_in
}
}
.title.hide-collapsed
.title.hide-collapsed
=
_
(
'Assignee'
)
=
_
(
'Assignee'
)
.spinner.spinner-sm.align-bottom
=
loading_icon
(
css_class:
'gl-vertical-align-text-bottom'
)
.selectbox.hide-collapsed
.selectbox.hide-collapsed
-
if
assignees
.
none?
-
if
assignees
.
none?
...
...
app/views/users/show.html.haml
View file @
8709fb53
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
-
if
current_user
&&
current_user
.
admin?
-
if
current_user
&&
current_user
.
admin?
=
link_to
[
:admin
,
@user
],
class:
link_classes
+
'btn btn-default'
,
title:
s_
(
'UserProfile|View user in admin area'
),
=
link_to
[
:admin
,
@user
],
class:
link_classes
+
'btn btn-default'
,
title:
s_
(
'UserProfile|View user in admin area'
),
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'users
'
)
=
sprite_icon
(
'user
'
)
.profile-header
{
class:
[(
'with-no-profile-tabs'
if
profile_tabs
.
empty?
)]
}
.profile-header
{
class:
[(
'with-no-profile-tabs'
if
profile_tabs
.
empty?
)]
}
.avatar-holder
.avatar-holder
...
...
changelogs/unreleased/225926-replace-fa-tag-and-sidebar-icons.yml
0 → 100644
View file @
8709fb53
---
title
:
Replace fa-tag(s) icons with GitLab SVG icons
merge_request
:
38979
author
:
type
:
changed
ee/spec/features/epics/epic_labels_spec.rb
View file @
8709fb53
...
@@ -38,7 +38,7 @@ RSpec.describe 'Assign labels to an epic', :js do
...
@@ -38,7 +38,7 @@ RSpec.describe 'Assign labels to an epic', :js do
context
'when labels icon is clicked on collapsed sidebar'
do
context
'when labels icon is clicked on collapsed sidebar'
do
before
do
before
do
page
.
within
(
'aside.right-sidebar'
)
do
page
.
within
(
'aside.right-sidebar'
)
do
find
(
'
.fa-tags
'
).
click
find
(
'
[data-testid="labels-icon"]
'
).
click
end
end
wait_for_requests
wait_for_requests
end
end
...
...
spec/frontend/sidebar/assignees_spec.js
View file @
8709fb53
import
{
mount
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
{
trimText
}
from
'
helpers/text_helper
'
;
import
{
trimText
}
from
'
helpers/text_helper
'
;
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
Assignee
from
'
~/sidebar/components/assignees/assignees.vue
'
;
import
Assignee
from
'
~/sidebar/components/assignees/assignees.vue
'
;
import
UsersMock
from
'
./mock_data
'
;
import
UsersMock
from
'
./mock_data
'
;
import
UsersMockHelper
from
'
../helpers/user_mock_data_helper
'
;
import
UsersMockHelper
from
'
../helpers/user_mock_data_helper
'
;
...
@@ -29,10 +30,12 @@ describe('Assignee component', () => {
...
@@ -29,10 +30,12 @@ describe('Assignee component', () => {
it
(
'
displays no assignee icon when collapsed
'
,
()
=>
{
it
(
'
displays no assignee icon when collapsed
'
,
()
=>
{
createWrapper
();
createWrapper
();
const
collapsedChildren
=
findCollapsedChildren
();
const
collapsedChildren
=
findCollapsedChildren
();
const
userIcon
=
collapsedChildren
.
at
(
0
).
find
(
GlIcon
);
expect
(
collapsedChildren
.
length
).
toBe
(
1
);
expect
(
collapsedChildren
.
length
).
toBe
(
1
);
expect
(
collapsedChildren
.
at
(
0
).
attributes
(
'
aria-label
'
)).
toBe
(
'
None
'
);
expect
(
collapsedChildren
.
at
(
0
).
attributes
(
'
aria-label
'
)).
toBe
(
'
None
'
);
expect
(
collapsedChildren
.
at
(
0
).
classes
()).
toContain
(
'
fa
'
,
'
fa-user
'
);
expect
(
userIcon
.
exists
()).
toBe
(
true
);
expect
(
userIcon
.
props
(
'
name
'
)).
toBe
(
'
user
'
);
});
});
it
(
'
displays only "None" when no users are assigned and the issue is read-only
'
,
()
=>
{
it
(
'
displays only "None" when no users are assigned and the issue is read-only
'
,
()
=>
{
...
...
spec/frontend/sidebar/components/assignees/collapsed_assignee_list_spec.js
View file @
8709fb53
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
UsersMockHelper
from
'
helpers/user_mock_data_helper
'
;
import
UsersMockHelper
from
'
helpers/user_mock_data_helper
'
;
import
CollapsedAssigneeList
from
'
~/sidebar/components/assignees/collapsed_assignee_list.vue
'
;
import
CollapsedAssigneeList
from
'
~/sidebar/components/assignees/collapsed_assignee_list.vue
'
;
import
CollapsedAssignee
from
'
~/sidebar/components/assignees/collapsed_assignee.vue
'
;
import
CollapsedAssignee
from
'
~/sidebar/components/assignees/collapsed_assignee.vue
'
;
...
@@ -20,7 +21,7 @@ describe('CollapsedAssigneeList component', () => {
...
@@ -20,7 +21,7 @@ describe('CollapsedAssigneeList component', () => {
});
});
}
}
const
findNoUsersIcon
=
()
=>
wrapper
.
find
(
'
i[aria-label=None]
'
);
const
findNoUsersIcon
=
()
=>
wrapper
.
find
(
GlIcon
);
const
findAvatarCounter
=
()
=>
wrapper
.
find
(
'
.avatar-counter
'
);
const
findAvatarCounter
=
()
=>
wrapper
.
find
(
'
.avatar-counter
'
);
const
findAssignees
=
()
=>
wrapper
.
findAll
(
CollapsedAssignee
);
const
findAssignees
=
()
=>
wrapper
.
findAll
(
CollapsedAssignee
);
const
getTooltipTitle
=
()
=>
wrapper
.
attributes
(
'
title
'
);
const
getTooltipTitle
=
()
=>
wrapper
.
attributes
(
'
title
'
);
...
@@ -38,6 +39,7 @@ describe('CollapsedAssigneeList component', () => {
...
@@ -38,6 +39,7 @@ describe('CollapsedAssigneeList component', () => {
it
(
'
has no users
'
,
()
=>
{
it
(
'
has no users
'
,
()
=>
{
expect
(
findNoUsersIcon
().
exists
()).
toBe
(
true
);
expect
(
findNoUsersIcon
().
exists
()).
toBe
(
true
);
expect
(
findNoUsersIcon
().
props
(
'
name
'
)).
toBe
(
'
user
'
);
});
});
});
});
...
...
spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed_spec.js
View file @
8709fb53
...
@@ -87,7 +87,7 @@ describe('DropdownValueCollapsedComponent', () => {
...
@@ -87,7 +87,7 @@ describe('DropdownValueCollapsedComponent', () => {
});
});
it
(
'
renders tags icon element
'
,
()
=>
{
it
(
'
renders tags icon element
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.fa-tags
'
)).
not
.
toBeNull
();
expect
(
vm
.
$el
.
querySelector
(
'
[data-testid="labels-icon"]
'
)).
not
.
toBeNull
();
});
});
it
(
'
renders labels count
'
,
()
=>
{
it
(
'
renders labels count
'
,
()
=>
{
...
...
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