diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-10 03:09:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-10 03:09:13 +0300 |
commit | b2cb8c48c5dddbbce803db8b7e600f722658002c (patch) | |
tree | d05d629228370a15001300bf9d3fb7c9cb873dd6 /spec/frontend/vue_shared/components/user_popover | |
parent | 4f288fdc9299a1951232a05593fcfd942c11b61f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_shared/components/user_popover')
-rw-r--r-- | spec/frontend/vue_shared/components/user_popover/user_popover_spec.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js b/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js index 16aa8379f56..a4ff6ac0c16 100644 --- a/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js +++ b/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js @@ -83,9 +83,10 @@ describe('User Popover Component', () => { describe('job data', () => { const findWorkInformation = () => wrapper.find({ ref: 'workInformation' }); const findBio = () => wrapper.find({ ref: 'bio' }); + const bio = 'My super interesting bio'; it('should show only bio if work information is not available', () => { - const user = { ...DEFAULT_PROPS.user, bio: 'My super interesting bio' }; + const user = { ...DEFAULT_PROPS.user, bio, bioHtml: bio }; createWrapper({ user }); @@ -107,7 +108,8 @@ describe('User Popover Component', () => { it('should display bio and work information in separate lines', () => { const user = { ...DEFAULT_PROPS.user, - bio: 'My super interesting bio', + bio, + bioHtml: bio, workInformation: 'Frontend Engineer at GitLab', }; @@ -120,12 +122,13 @@ describe('User Popover Component', () => { it('should not encode special characters in bio', () => { const user = { ...DEFAULT_PROPS.user, - bio: 'I like <html> & CSS', + bio: 'I like CSS', + bioHtml: 'I like <b>CSS</b>', }; createWrapper({ user }); - expect(findBio().text()).toBe('I like <html> & CSS'); + expect(findBio().html()).toContain('I like <b>CSS</b>'); }); it('shows icon for bio', () => { |