1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Avoid .toHaveTextContent in tests

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-05-04 14:39:54 +03:00
parent acc4635b36
commit 4468addd89

View File

@ -64,11 +64,11 @@ describe("<PreferencesNavigation />", () => {
});
it("does not show custom settings block", () => {
const { container } = render(
const { queryByTestId } = render(
<PreferencesNavigation/>,
);
expect(container).not.toHaveTextContent("Custom Settings");
expect(queryByTestId("extension-settings")).not.toBeInTheDocument();
});
});
@ -134,11 +134,11 @@ describe("<PreferencesNavigation />", () => {
});
it("shows custom settings block", () => {
const { container } = render(
const { getByTestId } = render(
<PreferencesNavigation/>,
);
expect(container).toHaveTextContent("Custom Settings");
expect(getByTestId("extension-settings")).toBeInTheDocument();
});
it("renders extension navigation items", () => {