Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-12-21 14:37:00 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-12-21 14:37:00 +0300
commit84655c3fd9f81b7c53b541ff920d385712125016 (patch)
tree7da9063321b8916469272e28c835e51fc3c75a4e /spec/javascripts
parent1567f17941df86164fcf0c39e0be5771b15f6b97 (diff)
parent63307ade1ce6652531f16835a42a2ba97740e425 (diff)
Merge branch '55293-split-bio-into-individual-line-in-extended-user-tooltips' into 'master'
Resolve "Split bio into individual line in extended user tooltips" Closes #55293 See merge request gitlab-org/gitlab-ce!23940
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/vue_shared/components/user_popover/user_popover_spec.js14
1 files changed, 9 insertions, 5 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 e16ab156679..25b6e3b6bc8 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
@@ -89,7 +89,7 @@ describe('User Popover Component', () => {
expect(vm.$el.textContent).toContain('GitLab');
});
- it('should have full job line when we have bio and organization', () => {
+ it('should display bio and organization in separate lines', () => {
const testProps = Object.assign({}, DEFAULT_PROPS);
testProps.user.bio = 'Engineer';
testProps.user.organization = 'GitLab';
@@ -99,20 +99,24 @@ describe('User Popover Component', () => {
target: document.querySelector('.js-user-link'),
});
- expect(vm.$el.textContent).toContain('Engineer at GitLab');
+ expect(vm.$el.querySelector('.js-bio').textContent).toContain('Engineer');
+ expect(vm.$el.querySelector('.js-organization').textContent).toContain('GitLab');
});
- it('should not encode special characters when we have bio and organization', () => {
+ it('should not encode special characters in bio and organization', () => {
const testProps = Object.assign({}, DEFAULT_PROPS);
testProps.user.bio = 'Manager & Team Lead';
- testProps.user.organization = 'GitLab';
+ testProps.user.organization = 'Me & my <funky> Company';
vm = mountComponent(UserPopover, {
...DEFAULT_PROPS,
target: document.querySelector('.js-user-link'),
});
- expect(vm.$el.textContent).toContain('Manager & Team Lead at GitLab');
+ expect(vm.$el.querySelector('.js-bio').textContent).toContain('Manager & Team Lead');
+ expect(vm.$el.querySelector('.js-organization').textContent).toContain(
+ 'Me & my <funky> Company',
+ );
});
});