From 4468addd89775c286c544f4c765459aeef75216e Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Wed, 4 May 2022 14:39:54 +0300 Subject: [PATCH] Avoid .toHaveTextContent in tests Signed-off-by: Alex Andreev --- .../__tests__/preferences-navigation.test.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/components/+preferences/preferences-navigation/__tests__/preferences-navigation.test.tsx b/src/renderer/components/+preferences/preferences-navigation/__tests__/preferences-navigation.test.tsx index a009323b60..f5c9371fb5 100644 --- a/src/renderer/components/+preferences/preferences-navigation/__tests__/preferences-navigation.test.tsx +++ b/src/renderer/components/+preferences/preferences-navigation/__tests__/preferences-navigation.test.tsx @@ -64,11 +64,11 @@ describe("", () => { }); it("does not show custom settings block", () => { - const { container } = render( + const { queryByTestId } = render( , ); - expect(container).not.toHaveTextContent("Custom Settings"); + expect(queryByTestId("extension-settings")).not.toBeInTheDocument(); }); }); @@ -134,11 +134,11 @@ describe("", () => { }); it("shows custom settings block", () => { - const { container } = render( + const { getByTestId } = render( , ); - expect(container).toHaveTextContent("Custom Settings"); + expect(getByTestId("extension-settings")).toBeInTheDocument(); }); it("renders extension navigation items", () => {