mirror of
https://github.com/fleetdm/fleet
synced 2026-05-18 14:38:53 +00:00
## For #31869 - Add fine grain controls for tooltip show and hide delay behavior - Default to 250ms show delay across app - Update ~30 unit tests to expect new delay - See [note](https://github.com/fleetdm/fleet/issues/31869#issuecomment-3300660487) https://github.com/user-attachments/assets/5969e0f7-c137-491f-8430-6f21d01b9350 - [x] Changes file added for user-visible changes in `changes/` - [x] QA'd all new/changed functionality manually --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
27 lines
828 B
TypeScript
27 lines
828 B
TypeScript
import React from "react";
|
|
|
|
import { screen } from "@testing-library/react";
|
|
import { renderWithSetup } from "test/test-utils";
|
|
|
|
import IssuesIndicator from "./IssuesIndicator";
|
|
|
|
describe("Issues indicator", () => {
|
|
it("renders total issues count, critical vulnerabilities count, and failing policies count", async () => {
|
|
const { user } = renderWithSetup(
|
|
<IssuesIndicator
|
|
totalIssuesCount={5}
|
|
criticalVulnerabilitiesCount={3}
|
|
failingPoliciesCount={2}
|
|
/>
|
|
);
|
|
await user.hover(screen.getByText("5"));
|
|
|
|
const vulnerabilitiesTooltip = screen.getByText(
|
|
/Critical vulnerabilities/i
|
|
);
|
|
const policiesTooltip = screen.getByText(/Failing policies/i);
|
|
|
|
expect(vulnerabilitiesTooltip).toBeInTheDocument();
|
|
expect(policiesTooltip).toBeInTheDocument();
|
|
});
|
|
});
|