2022-12-07 17:59:38 +00:00
|
|
|
import React from "react";
|
2024-06-18 19:26:45 +00:00
|
|
|
import { render, screen } from "@testing-library/react";
|
2022-12-07 17:59:38 +00:00
|
|
|
|
|
|
|
|
import IssueCell from "./IssueCell";
|
|
|
|
|
|
|
|
|
|
describe("Issue cell", () => {
|
2024-06-18 19:26:45 +00:00
|
|
|
it("renders --- if total issues count is 0", async () => {
|
|
|
|
|
render(
|
2022-12-07 17:59:38 +00:00
|
|
|
<IssueCell
|
|
|
|
|
issues={{
|
2024-06-18 19:26:45 +00:00
|
|
|
total_issues_count: 0,
|
|
|
|
|
failing_policies_count: 0,
|
2022-12-07 17:59:38 +00:00
|
|
|
}}
|
|
|
|
|
rowId={1}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
|
2024-06-18 19:26:45 +00:00
|
|
|
expect(screen.getByText(/---/i)).toBeInTheDocument();
|
2022-12-07 17:59:38 +00:00
|
|
|
});
|
|
|
|
|
});
|