Skip to content

Commit

Permalink
test: added test case for tooltip disable
Browse files Browse the repository at this point in the history
  • Loading branch information
aAmorim27 committed Jan 17, 2023
1 parent cc4c416 commit 9c790c4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/components/tooltip/test/tooltip.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '<button>Hover me</button>',
},
}
)
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')
Expand Down

0 comments on commit 9c790c4

Please sign in to comment.