fleet/frontend/components/TableContainer/DataTable/PerformanceImpactCell/PerformanceImpactCell.tests.tsx
Jacob Shandling 1fa5004428
UI – Add and update performance impact features to uitilize metrics that include live query runs (#15642)
Merging during freeze with approval from all stakeholders, including verbal approval from @sharon-fdm 

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-12-14 11:49:56 -08:00

19 lines
596 B
TypeScript

import React from "react";
import { screen } from "@testing-library/react";
import { renderWithSetup } from "test/test-utils";
import PerformanceImpactCell from "./PerformanceImpactCell";
const PERFORMANCE_IMPACT = { indicator: "Minimal", id: 3 };
describe("Query performance cell", () => {
it("renders pill text and tooltip on hover", async () => {
const { user } = renderWithSetup(
<PerformanceImpactCell value={PERFORMANCE_IMPACT} />
);
await user.hover(screen.getByText("Minimal"));
expect(screen.getByText(/little to no impact/i)).toBeInTheDocument();
});
});