From 434f5da401e5e75500ea996fb655d65d46922f94 Mon Sep 17 00:00:00 2001 From: Martin Ledvinka Date: Mon, 21 Oct 2024 15:25:24 +0200 Subject: [PATCH] [Enhancement #536] Update faceted search tests. --- .../search/facet/__tests__/FacetedSearch.test.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/component/search/facet/__tests__/FacetedSearch.test.tsx b/src/component/search/facet/__tests__/FacetedSearch.test.tsx index de676e67..83e464cc 100644 --- a/src/component/search/facet/__tests__/FacetedSearch.test.tsx +++ b/src/component/search/facet/__tests__/FacetedSearch.test.tsx @@ -46,7 +46,7 @@ describe("FacetedSearch", () => { matchType: MatchType.SUBSTRING, }; await act(async () => { - wrapper.find(TextFacet).prop("onChange")(firstNotationValue); + wrapper.find(TextFacet).at(0).prop("onChange")(firstNotationValue); }); wrapper.update(); act(() => { @@ -58,7 +58,7 @@ describe("FacetedSearch", () => { matchType: MatchType.SUBSTRING, }; await act(async () => { - wrapper.find(TextFacet).prop("onChange")(secondNotationValue); + wrapper.find(TextFacet).at(0).prop("onChange")(secondNotationValue); }); wrapper.update(); expect(wrapper.find(SimplePagination).prop("page")).toEqual(0); @@ -84,7 +84,7 @@ describe("FacetedSearch", () => { matchType: MatchType.SUBSTRING, }; await act(async () => { - wrapper.find(TextFacet).prop("onChange")(firstNotationValue); + wrapper.find(TextFacet).at(0).prop("onChange")(firstNotationValue); }); wrapper.update(); (SearchActions.executeFacetedTermSearch as jest.Mock).mockReset(); @@ -140,7 +140,7 @@ describe("FacetedSearch", () => { expect(wrapper.exists(FacetedSearchResults)).toBeFalsy(); expect(wrapper.exists(SimplePagination)).toBeFalsy(); await act(async () => { - wrapper.find(TextFacet).prop("onChange")(firstNotationValue); + wrapper.find(TextFacet).at(0).prop("onChange")(firstNotationValue); }); wrapper.update(); act(() => { @@ -155,7 +155,7 @@ describe("FacetedSearch", () => { matchType: MatchType.SUBSTRING, }; act(() => { - wrapper.find(TextFacet).prop("onChange")(secondNotationValue); + wrapper.find(TextFacet).at(0).prop("onChange")(secondNotationValue); }); await act(async () => { wrapper.update();