diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js')
-rw-r--r-- | spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js b/spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js index 5a3a152d201..69f6a6e6e04 100644 --- a/spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js +++ b/spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js @@ -81,30 +81,33 @@ describe('AssigneeAvatarLink component', () => { ); describe.each` - tooltipHasName | availability | canMerge | expected - ${true} | ${'Busy'} | ${false} | ${'Root (Busy) (cannot merge)'} - ${true} | ${'Busy'} | ${true} | ${'Root (Busy)'} - ${true} | ${''} | ${false} | ${'Root (cannot merge)'} - ${true} | ${''} | ${true} | ${'Root'} - ${false} | ${'Busy'} | ${false} | ${'Cannot merge'} - ${false} | ${'Busy'} | ${true} | ${''} - ${false} | ${''} | ${false} | ${'Cannot merge'} - ${false} | ${''} | ${true} | ${''} + tooltipHasName | name | availability | canMerge | expected + ${true} | ${"Rabbit O'Hare"} | ${''} | ${true} | ${"Rabbit O'Hare"} + ${true} | ${"Rabbit O'Hare"} | ${'Busy'} | ${false} | ${"Rabbit O'Hare (Busy) (cannot merge)"} + ${true} | ${'Root'} | ${'Busy'} | ${false} | ${'Root (Busy) (cannot merge)'} + ${true} | ${'Root'} | ${'Busy'} | ${true} | ${'Root (Busy)'} + ${true} | ${'Root'} | ${''} | ${false} | ${'Root (cannot merge)'} + ${true} | ${'Root'} | ${''} | ${true} | ${'Root'} + ${false} | ${'Root'} | ${'Busy'} | ${false} | ${'Cannot merge'} + ${false} | ${'Root'} | ${'Busy'} | ${true} | ${''} + ${false} | ${'Root'} | ${''} | ${false} | ${'Cannot merge'} + ${false} | ${'Root'} | ${''} | ${true} | ${''} `( - "with tooltipHasName=$tooltipHasName and availability='$availability' and canMerge=$canMerge", - ({ tooltipHasName, availability, canMerge, expected }) => { + "with name=$name tooltipHasName=$tooltipHasName and availability='$availability' and canMerge=$canMerge", + ({ name, tooltipHasName, availability, canMerge, expected }) => { beforeEach(() => { createComponent({ tooltipHasName, user: { ...userDataMock(), + name, can_merge: canMerge, availability, }, }); }); - it('sets tooltip to $expected', () => { + it(`sets tooltip to "${expected}"`, () => { expect(findTooltipText()).toBe(expected); }); }, |