summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2019-04-24 19:55:14 +0000
committerTim Zallmann <tzallmann@gitlab.com>2019-04-24 19:55:14 +0000
commit0edd8a6e937e840c614bc436c3689a6c5a6edcb9 (patch)
tree03152703d3636eaa596da09c77139cfcd7a7fe24 /spec/javascripts
parentfed474f591158935b20d181fd527a0ae9bdbde05 (diff)
parent68afb3eda75aaf67012853d5ad0103ea83df6384 (diff)
downloadgitlab-ce-0edd8a6e937e840c614bc436c3689a6c5a6edcb9.tar.gz
Merge branch '60387-use-icons-in-user-popovers' into 'master'
Show category icons in user popover Closes #60387 See merge request gitlab-org/gitlab-ce!27254
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/vue_shared/components/user_popover/user_popover_spec.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/javascripts/vue_shared/components/user_popover/user_popover_spec.js b/spec/javascripts/vue_shared/components/user_popover/user_popover_spec.js
index 852558a83bc..c7e0d806d80 100644
--- a/spec/javascripts/vue_shared/components/user_popover/user_popover_spec.js
+++ b/spec/javascripts/vue_shared/components/user_popover/user_popover_spec.js
@@ -61,6 +61,12 @@ describe('User Popover Component', () => {
expect(vm.$el.textContent).toContain(DEFAULT_PROPS.user.username);
expect(vm.$el.textContent).toContain(DEFAULT_PROPS.user.location);
});
+
+ it('shows icon for location', () => {
+ const iconEl = vm.$el.querySelector('.js-location svg');
+
+ expect(iconEl.querySelector('use').getAttribute('xlink:href')).toContain('location');
+ });
});
describe('job data', () => {
@@ -117,6 +123,18 @@ describe('User Popover Component', () => {
'Me & my <funky> Company',
);
});
+
+ it('shows icon for bio', () => {
+ const iconEl = vm.$el.querySelector('.js-bio svg');
+
+ expect(iconEl.querySelector('use').getAttribute('xlink:href')).toContain('profile');
+ });
+
+ it('shows icon for organization', () => {
+ const iconEl = vm.$el.querySelector('.js-organization svg');
+
+ expect(iconEl.querySelector('use').getAttribute('xlink:href')).toContain('work');
+ });
});
describe('status data', () => {