@viamrobotics/prime-core
Advanced tools
Comparing version 0.0.112 to 0.0.113
@@ -69,8 +69,8 @@ import { describe, it, expect, beforeEach, vi } from 'vitest'; | ||
await user.type(input, 'a'); | ||
expect(tooltip).not.toHaveClass('invisible'); | ||
expect(tooltip).not.toHaveClass('hidden'); | ||
expect(tooltip).not.toHaveClass('animate-wiggle'); | ||
await waitFor(() => expect(tooltip).toHaveClass('invisible')); | ||
await waitFor(() => expect(tooltip).toHaveClass('hidden')); | ||
// Type multiple invalid characters, which shows the tooltip and wiggles | ||
await user.type(input, 'aa'); | ||
expect(tooltip).not.toHaveClass('invisible'); | ||
expect(tooltip).not.toHaveClass('hidden'); | ||
expect(tooltip).toHaveClass('animate-wiggle'); | ||
@@ -77,0 +77,0 @@ await waitFor(() => expect(tooltip).not.toHaveClass('animate-wiggle')); |
@@ -11,3 +11,3 @@ import { describe, it, expect } from 'vitest'; | ||
expect(target).toBeInTheDocument(); | ||
expect(tooltip).toHaveClass('invisible'); | ||
expect(tooltip).toHaveClass('hidden'); | ||
}); | ||
@@ -27,9 +27,9 @@ it('passes the tooltip ID to the target slot', () => { | ||
// tooltip should initially be invisible before styles calculate | ||
expect(tooltip).toHaveClass('invisible'); | ||
expect(tooltip).toHaveClass('hidden'); | ||
// then it should become visible | ||
await waitFor(() => expect(tooltip).not.toHaveClass('invisible')); | ||
await user.hover(target); | ||
expect(tooltip).not.toHaveClass('invisible'); | ||
expect(tooltip).not.toHaveClass('hidden'); | ||
await user.unhover(target); | ||
expect(tooltip).not.toHaveClass('invisible'); | ||
expect(tooltip).not.toHaveClass('hidden'); | ||
}); | ||
@@ -42,8 +42,8 @@ it('does not render the tooltip when state is invisible', async () => { | ||
// tooltip should initially be invisible before styles calculate | ||
expect(tooltip).toHaveClass('invisible'); | ||
expect(tooltip).toHaveClass('hidden'); | ||
// tooltip should stay invisible despite hover state | ||
await user.hover(target); | ||
expect(tooltip).toHaveClass('invisible'); | ||
expect(tooltip).toHaveClass('hidden'); | ||
await user.unhover(target); | ||
expect(tooltip).toHaveClass('invisible'); | ||
expect(tooltip).toHaveClass('hidden'); | ||
}); | ||
@@ -56,5 +56,5 @@ it('shows/hides the tooltip on mouse enter/exit', async () => { | ||
await user.hover(target); | ||
expect(tooltip).not.toHaveClass('invisible'); | ||
expect(tooltip).not.toHaveClass('hidden'); | ||
await user.unhover(target); | ||
expect(tooltip).toHaveClass('invisible'); | ||
expect(tooltip).toHaveClass('hidden'); | ||
}); | ||
@@ -67,3 +67,3 @@ it('shows the tooltip on mouse enter after a delay', async () => { | ||
await user.hover(target); | ||
expect(tooltip).toHaveClass('invisible'); | ||
expect(tooltip).toHaveClass('hidden'); | ||
await waitFor(() => expect(tooltip).not.toHaveClass('invisible')); | ||
@@ -77,7 +77,7 @@ }); | ||
expect(target).toHaveFocus(); | ||
expect(tooltip).not.toHaveClass('invisible'); | ||
expect(tooltip).not.toHaveClass('hidden'); | ||
await userEvent.tab(); | ||
expect(target).not.toHaveFocus(); | ||
expect(tooltip).toHaveClass('invisible'); | ||
expect(tooltip).toHaveClass('hidden'); | ||
}); | ||
}); |
{ | ||
"name": "@viamrobotics/prime-core", | ||
"version": "0.0.112", | ||
"version": "0.0.113", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
Sorry, the diff of this file is not supported yet
361983