From f3e35baad052013d81b5ba32955740d00cfe8d1e Mon Sep 17 00:00:00 2001 From: "D. Ror." Date: Wed, 14 Aug 2024 17:09:31 -0400 Subject: [PATCH] [EntryCellComponents] Move tests to @testing-library (#3304) --- .../tests/GlossWithSuggestions.test.tsx | 16 ++++++++-------- .../tests/VernWithSuggestions.test.tsx | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/components/DataEntry/DataEntryTable/EntryCellComponents/tests/GlossWithSuggestions.test.tsx b/src/components/DataEntry/DataEntryTable/EntryCellComponents/tests/GlossWithSuggestions.test.tsx index 628abd6bec..15b9c7c310 100644 --- a/src/components/DataEntry/DataEntryTable/EntryCellComponents/tests/GlossWithSuggestions.test.tsx +++ b/src/components/DataEntry/DataEntryTable/EntryCellComponents/tests/GlossWithSuggestions.test.tsx @@ -1,5 +1,5 @@ -import { createRef } from "react"; -import renderer from "react-test-renderer"; +import { render } from "@testing-library/react"; +import { act, createRef } from "react"; import GlossWithSuggestions from "components/DataEntry/DataEntryTable/EntryCellComponents/GlossWithSuggestions"; import { newWritingSystem } from "types/writingSystem"; @@ -17,8 +17,8 @@ jest.mock("@mui/base/node/useAutocomplete/useAutocomplete", () => ({ describe("GlossWithSuggestions", () => { it("renders with gloss", () => { - renderer.act(() => { - renderer.create( + act(() => { + render( ()} @@ -32,8 +32,8 @@ describe("GlossWithSuggestions", () => { }); it("renders new", () => { - renderer.act(() => { - renderer.create( + act(() => { + render( { }); it("renders disabled", () => { - renderer.act(() => { - renderer.create( + act(() => { + render( ({ describe("VernWithSuggestions", () => { it("renders with vernacular", () => { - renderer.act(() => { - renderer.create( + act(() => { + render( ()} @@ -33,8 +33,8 @@ describe("VernWithSuggestions", () => { }); it("renders new", () => { - renderer.act(() => { - renderer.create( + act(() => { + render( { }); it("renders disabled", () => { - renderer.act(() => { - renderer.create( + act(() => { + render(