fleet/frontend/components/TableContainer/DataTable/PillCell/PillCell.tests.tsx

20 lines
556 B
TypeScript
Raw Normal View History

import React from "react";
import { screen } from "@testing-library/react";
2022-12-15 17:06:09 +00:00
import { renderWithSetup } from "test/test-utils";
import PillCell from "./PillCell";
const PERFORMANCE_IMPACT = { indicator: "Minimal", id: 3 };
describe("Pill cell", () => {
it("renders pill text and tooltip on hover", async () => {
const { user } = renderWithSetup(
<PillCell value={PERFORMANCE_IMPACT} hostDetails />
);
await user.hover(screen.getByText("Minimal"));
expect(screen.getByText(/little to no impact/i)).toBeInTheDocument();
});
});