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:
Diffstat (limited to 'spec/frontend/vue_shared/components/help_popover_spec.js')
-rw-r--r--spec/frontend/vue_shared/components/help_popover_spec.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/frontend/vue_shared/components/help_popover_spec.js b/spec/frontend/vue_shared/components/help_popover_spec.js
index baf80a8a04e..30c6fa04032 100644
--- a/spec/frontend/vue_shared/components/help_popover_spec.js
+++ b/spec/frontend/vue_shared/components/help_popover_spec.js
@@ -27,7 +27,6 @@ describe('HelpPopover', () => {
afterEach(() => {
wrapper.destroy();
- wrapper = null;
});
it('renders a link button with an icon question', () => {
@@ -35,17 +34,12 @@ describe('HelpPopover', () => {
icon: 'question',
variant: 'link',
});
- expect(findQuestionButton().attributes().tabindex).toBe('0');
});
it('renders popover that uses the question button as target', () => {
expect(findPopover().props().target()).toBe(findQuestionButton().vm.$el);
});
- it('triggers popover on hover and focus', () => {
- expect(findPopover().props().triggers).toBe('hover focus');
- });
-
it('allows rendering title with HTML tags', () => {
expect(findPopover().find('strong').exists()).toBe(true);
});
@@ -54,6 +48,14 @@ describe('HelpPopover', () => {
expect(findPopover().find('b').exists()).toBe(true);
});
+ describe('without title', () => {
+ it('does not render title', () => {
+ buildWrapper({ title: null });
+
+ expect(findPopover().find('span').exists()).toBe(false);
+ });
+ });
+
it('binds other popover options to the popover instance', () => {
const placement = 'bottom';