|
@@ -11,15 +11,15 @@ describe('TooltipDirective', () => {
|
|
|
it('should show/hide tooltip on hover', async () => {
|
|
|
const wrapper = renderComponent({
|
|
|
template: `
|
|
|
- <div v-tooltip="'Hello, Tooltip'">Foo Test World</div>
|
|
|
- `,
|
|
|
+ <div v-tooltip="'Hello, Tooltip'">Foo Test World</div>
|
|
|
+ `,
|
|
|
})
|
|
|
|
|
|
await wrapper.events.hover(wrapper.getByText('Foo Test World'))
|
|
|
|
|
|
- await waitFor(() => {
|
|
|
- expect(wrapper.queryByText('Hello, Tooltip')).toBeInTheDocument()
|
|
|
- })
|
|
|
+ await waitFor(() =>
|
|
|
+ expect(wrapper.queryByText('Hello, Tooltip')).toBeInTheDocument(),
|
|
|
+ )
|
|
|
|
|
|
await wrapper.events.unhover(wrapper.getByText('Foo Test World'))
|
|
|
|
|
@@ -34,9 +34,9 @@ describe('TooltipDirective', () => {
|
|
|
<div v-tooltip="'Hello, Tooltip'">Foo Test World</div>
|
|
|
`,
|
|
|
})
|
|
|
- await waitFor(() => {
|
|
|
- expect(wrapper.queryByLabelText('Hello, Tooltip')).toBeInTheDocument()
|
|
|
- })
|
|
|
+ await waitFor(() =>
|
|
|
+ expect(wrapper.queryByLabelText('Hello, Tooltip')).toBeInTheDocument(),
|
|
|
+ )
|
|
|
})
|
|
|
|
|
|
it('should hide tooltip on scroll', async () => {
|
|
@@ -48,15 +48,15 @@ describe('TooltipDirective', () => {
|
|
|
|
|
|
await wrapper.events.hover(wrapper.getByText('Foo Test World'))
|
|
|
|
|
|
- await waitFor(() => {
|
|
|
- expect(wrapper.queryByText('Hello, Tooltip')).toBeInTheDocument()
|
|
|
- })
|
|
|
+ await waitFor(() =>
|
|
|
+ expect(wrapper.queryByText('Hello, Tooltip')).toBeInTheDocument(),
|
|
|
+ )
|
|
|
|
|
|
window.dispatchEvent(new Event('scroll'))
|
|
|
|
|
|
- await waitFor(() => {
|
|
|
- expect(wrapper.queryByText('Hello, Tooltip')).not.toBeInTheDocument()
|
|
|
- })
|
|
|
+ await waitFor(() =>
|
|
|
+ expect(wrapper.queryByText('Hello, Tooltip')).not.toBeInTheDocument(),
|
|
|
+ )
|
|
|
})
|
|
|
})
|
|
|
|
|
@@ -85,9 +85,9 @@ describe('TooltipDirective', () => {
|
|
|
await fireEvent.touchStart(wrapper.getByText('Foo Test World'))
|
|
|
await fireEvent.touchEnd(wrapper.getByText('Foo Test World'))
|
|
|
|
|
|
- await waitFor(() => {
|
|
|
- expect(wrapper.queryByText('Hello, Tooltip')).not.toBeInTheDocument()
|
|
|
- })
|
|
|
+ await waitFor(() =>
|
|
|
+ expect(wrapper.queryByText('Hello, Tooltip')).not.toBeInTheDocument(),
|
|
|
+ )
|
|
|
})
|
|
|
|
|
|
it('updated tooltip locale', async () => {
|