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