mirror of
https://github.com/fleetdm/fleet
synced 2026-04-27 16:37:55 +00:00
# Checklist for submitter If some of the following don't apply, delete the relevant line. - [ ] Manual QA for all new/changed functionality --------- Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com>
28 lines
734 B
TypeScript
28 lines
734 B
TypeScript
import React from "react";
|
|
import { screen } from "@testing-library/react";
|
|
import { createCustomRenderer } from "test/test-utils";
|
|
|
|
import IssueCell from "./IssueCell";
|
|
|
|
describe("Issue cell", () => {
|
|
it("renders icon, total issues, and failing policies tooltip", async () => {
|
|
const render = createCustomRenderer({});
|
|
|
|
const { user } = render(
|
|
<IssueCell
|
|
issues={{
|
|
total_issues_count: 4,
|
|
failing_policies_count: 2,
|
|
}}
|
|
rowId={1}
|
|
/>
|
|
);
|
|
|
|
const icon = screen.queryByTestId("error-outline-icon");
|
|
|
|
await user.hover(screen.getByText("4"));
|
|
|
|
expect(screen.getByText(/failing policies/i)).toBeInTheDocument();
|
|
expect(icon).toBeInTheDocument();
|
|
});
|
|
});
|