import { UApp } from './UApp' import { describe, it, expect } from 'vitest' import { mount } from '@vue/test-utils' describe('UApp', () => { //a test case to check if the tooltip renders correctly it('should render correctly', () => { const wrapper = mount(UApp) expect(wrapper.html()).toMatchSnapshot() }) //a test to check if the tooltip is visible when the mouse is over the element // it('should show tooltip when mouse is over the element', async () => { // const wrapper = mount(UTooltip, { // props: { // position: 'top', // always: false, // }, // slots: { // tooltipToggle: { template: `
Toggle
` }, // text: 'Tooltip Text', // }, // }) // const tooltipToggle = wrapper.find('.toggle') // await tooltipToggle.trigger('mouseenter') // const tooltipComponent = wrapper.find('.tooltip') // expect(tooltipComponent.exists()).toBe(true) // expect(tooltipComponent.isVisible()).toBe(true) // await tooltipToggle.trigger('mouseleave') // expect(tooltipComponent.isVisible()).toBe(false) // }) })