feat: add empty state and expand overlay qa

This commit is contained in:
2026-03-19 19:00:36 +08:00
parent f318f94c9a
commit 132bb6961d
20 changed files with 1094 additions and 6 deletions
@@ -59,4 +59,30 @@ describe("Tooltip", () => {
expect(onOpenChange).toHaveBeenCalledWith(true);
});
});
it("shows tooltip content on focus and hides it on blur", async () => {
render(
<TooltipProvider delayDuration={0}>
<Tooltip>
<TooltipTrigger>Focus help</TooltipTrigger>
<TooltipContent>Focus context</TooltipContent>
</Tooltip>
</TooltipProvider>
);
const trigger = screen.getByRole("button", { name: "Focus help" });
trigger.focus();
const tooltip = await screen.findByRole("tooltip");
expect(tooltip).toHaveTextContent("Focus context");
expect(trigger).toHaveFocus();
trigger.blur();
await waitFor(() => {
expect(screen.queryByRole("tooltip")).not.toBeInTheDocument();
});
});
});