Avoid .toHaveTextContent in tests

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2022-05-04 14:39:54 +03:00
1 parent acc4635b36
commit 4468addd89
1 file changed
+4 -4
@@ -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", () => {