mirror of
https://github.com/fleetdm/fleet
synced 2026-05-17 05:58:40 +00:00
19 lines
580 B
JavaScript
19 lines
580 B
JavaScript
import React from "react";
|
|
import { render, screen } from "@testing-library/react";
|
|
|
|
import PanelGroup from "./PanelGroup";
|
|
|
|
describe("PanelGroup - component", () => {
|
|
const validPanelGroupItems = [
|
|
{ type: "all", display_text: "All Hosts", hosts_count: 20 },
|
|
{ type: "platform", display_text: "MAC OS", hosts_count: 10 },
|
|
];
|
|
|
|
render(<PanelGroup groupItems={validPanelGroupItems} />);
|
|
|
|
it("renders a PanelGroupItem for each group item", () => {
|
|
const panelGroupItems = screen.queryAllByRole("button");
|
|
|
|
expect(panelGroupItems.length).toEqual(2);
|
|
});
|
|
});
|