From 9c790c4ad46c525a48ed538431d83d7ecfd6e9a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Tue, 17 Jan 2023 11:55:12 +0100 Subject: [PATCH] test: added test case for tooltip disable --- packages/components/tooltip/test/tooltip.spec.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/components/tooltip/test/tooltip.spec.ts b/packages/components/tooltip/test/tooltip.spec.ts index 86fcc82c..a52f66b9 100644 --- a/packages/components/tooltip/test/tooltip.spec.ts +++ b/packages/components/tooltip/test/tooltip.spec.ts @@ -48,6 +48,19 @@ describe('Tooltip tests', () => { expect(findToolTip().attributes('data-popper-placement')).toBe('right') }) + it('should be disabled', async () => { + await factory( + { isDisabled: true }, + { + slots: { + default: '', + }, + } + ) + await expect(wrapper.find('button').trigger('mouseover')) + expect(findToolTip().isVisible()).toBe(false) + }) + it('should have a custom z-index', async () => { await factory({ zindex: 5000 }) expect(findToolTip().element.style.getPropertyValue('z-index')).toBe('5000')