mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
Fixes chevron icon for view all host link component - [x] Manual QA for all new/changed functionality
22 lines
699 B
TypeScript
22 lines
699 B
TypeScript
import React from "react";
|
|
import { render, screen } from "@testing-library/react";
|
|
import ViewAllHostsLink from "./ViewAllHostsLink";
|
|
|
|
describe("ViewAllHostsLink - component", () => {
|
|
it("renders View all hosts text and icon", () => {
|
|
render(<ViewAllHostsLink />);
|
|
|
|
const text = screen.getByText("View all hosts");
|
|
const icon = screen.getByTestId("chevron-right-icon");
|
|
|
|
expect(text).toBeInTheDocument();
|
|
expect(icon).toBeInTheDocument();
|
|
});
|
|
|
|
it("hides text when set to condensed ", async () => {
|
|
render(<ViewAllHostsLink queryParams={{ status: "online" }} condensed />);
|
|
const text = screen.queryByText("View all hosts");
|
|
|
|
expect(text).toBeNull();
|
|
});
|
|
});
|