diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-10 21:07:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-10 21:07:39 +0300 |
commit | 8cc4a6f23d41a1c57dc309130d2ce9ebc04d8334 (patch) | |
tree | 8391f5ee4f3391534131ae834b4b0a413845239e /spec/frontend/users | |
parent | 87f8fdb93cb1e63f8e9cedf7d3d00c8ade70b18c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/users')
-rw-r--r-- | spec/frontend/users/profile/components/report_abuse_button_spec.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/frontend/users/profile/components/report_abuse_button_spec.js b/spec/frontend/users/profile/components/report_abuse_button_spec.js index bd39a089473..a09a437a9cc 100644 --- a/spec/frontend/users/profile/components/report_abuse_button_spec.js +++ b/spec/frontend/users/profile/components/report_abuse_button_spec.js @@ -1,5 +1,6 @@ import { GlButton } from '@gitlab/ui'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; +import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants'; import ReportAbuseButton from '~/users/profile/components/report_abuse_button.vue'; import AbuseCategorySelector from '~/abuse_reports/components/abuse_category_selector.vue'; @@ -69,4 +70,14 @@ describe('ReportAbuseButton', () => { expect(findAbuseCategorySelector().props('showDrawer')).toBe(false); }); }); + + describe('when user hovers out of the button', () => { + it(`should emit ${BV_HIDE_TOOLTIP} to close the tooltip`, () => { + jest.spyOn(wrapper.vm.$root, '$emit'); + + findReportAbuseButton().vm.$emit('mouseout'); + + expect(wrapper.vm.$root.$emit).toHaveBeenCalledWith(BV_HIDE_TOOLTIP); + }); + }); }); |