mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
chore(test): rewritten query side panel test using rtl (#5189)
This commit is contained in:
parent
babccf8a36
commit
e0fc5dcd76
1 changed files with 4 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import React from "react";
|
||||
import { mount } from "enzyme";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
|
||||
import { stubbedOsqueryTable } from "test/helpers";
|
||||
|
||||
|
|
@ -15,10 +15,10 @@ describe("QuerySidePanel - component", () => {
|
|||
};
|
||||
|
||||
it("renders the selected table in the dropdown", () => {
|
||||
const component = mount(<QuerySidePanel {...props} />);
|
||||
const tableSelect = component.find("Dropdown");
|
||||
render(<QuerySidePanel {...props} />);
|
||||
|
||||
expect(tableSelect.prop("value")).toEqual("users");
|
||||
expect(screen.getByRole("combobox")).toBeInTheDocument();
|
||||
expect(screen.getByText("users")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
// TODO: Functional components cannot test functions using Enzyme since
|
||||
|
|
|
|||
Loading…
Reference in a new issue