diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-29 12:09:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-29 12:09:58 +0300 |
commit | 6c4a39fa9f77d6d7dd971118b5402a5387eb8846 (patch) | |
tree | 41065fdc4d56111b9359a061dac2181aad8adcd8 /spec/frontend | |
parent | a412f4f58679c9d9120da6dc69ff02a6fcec0c5a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
-rw-r--r-- | spec/frontend/super_sidebar/components/user_name_group_spec.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/frontend/super_sidebar/components/user_name_group_spec.js b/spec/frontend/super_sidebar/components/user_name_group_spec.js index bd02f3c17e3..a31ad93d143 100644 --- a/spec/frontend/super_sidebar/components/user_name_group_spec.js +++ b/spec/frontend/super_sidebar/components/user_name_group_spec.js @@ -97,6 +97,22 @@ describe('UserNameGroup component', () => { it("sets the tooltip's target to the status container", () => { expect(findGlTooltip().props('target')?.()).toBe(findUserStatus().element); }); + + describe('Tooltip', () => { + it('renders the tooltip when message has some text', () => { + createWrapper({ + status: { ...userMenuMockStatus, customized: true, message_html: 'Has text' }, + }); + expect(findGlTooltip().exists()).toBe(true); + }); + + it('does not render the tooltip when message is empty', () => { + createWrapper({ + status: { ...userMenuMockStatus, customized: true, message_html: '' }, + }); + expect(findGlTooltip().exists()).toBe(false); + }); + }); }); }); |