mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
chore(test): rewritten panelgroup component test using rtl (#4628)
This commit is contained in:
parent
b512eef210
commit
cb159970c1
1 changed files with 3 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import React from "react";
|
||||
import { mount } from "enzyme";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
|
||||
import PanelGroup from "./PanelGroup";
|
||||
|
||||
|
|
@ -9,10 +9,10 @@ describe("PanelGroup - component", () => {
|
|||
{ type: "platform", display_text: "MAC OS", hosts_count: 10 },
|
||||
];
|
||||
|
||||
const component = mount(<PanelGroup groupItems={validPanelGroupItems} />);
|
||||
render(<PanelGroup groupItems={validPanelGroupItems} />);
|
||||
|
||||
it("renders a PanelGroupItem for each group item", () => {
|
||||
const panelGroupItems = component.find("PanelGroupItem");
|
||||
const panelGroupItems = screen.queryAllByRole("button");
|
||||
|
||||
expect(panelGroupItems.length).toEqual(2);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue