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
|
|
|
import PATHS from "router/paths";
|
|
|
|
|
|
|
|
|
|
import LinkCell from "./LinkCell";
|
|
|
|
|
|
|
|
|
|
const VALUE = "40 hosts";
|
|
|
|
|
describe("Link cell", () => {
|
2023-08-22 13:20:40 +00:00
|
|
|
it("renders text", async () => {
|
2022-12-07 17:59:38 +00:00
|
|
|
const { user } = renderWithSetup(
|
|
|
|
|
<LinkCell value={VALUE} path={PATHS.MANAGE_HOSTS} />
|
|
|
|
|
);
|
|
|
|
|
|
2023-08-22 13:20:40 +00:00
|
|
|
expect(screen.getByText("40 hosts")).toBeInTheDocument();
|
|
|
|
|
// Note: Testing react-router Link would require Router or MemoryRouter wrapper which is app level
|
2022-12-07 17:59:38 +00:00
|
|
|
});
|
|
|
|
|
});
|