summaryrefslogtreecommitdiff
path: root/spec/javascripts/vue_shared
diff options
context:
space:
mode:
authorKushal Pandya <kushalspandya@gmail.com>2019-04-11 14:45:32 +0530
committerKushal Pandya <kushalspandya@gmail.com>2019-04-22 12:39:19 +0530
commit2d58213f09f8c20a75b7d3d04503f48947565103 (patch)
tree790e54dbf29eb0d579acc57f0ea82088794d434e /spec/javascripts/vue_shared
parentd8d57f23b26df6c0d07fc7911edee16a70a775f0 (diff)
downloadgitlab-ce-2d58213f09f8c20a75b7d3d04503f48947565103.tar.gz
Show category icons in user popover
Show bio, organization and location icons within user popover.
Diffstat (limited to 'spec/javascripts/vue_shared')
-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', () => {