Skip to content

Commit

Permalink
[Enhancement #536] Update faceted search tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledsoft committed Oct 21, 2024
1 parent e98a767 commit 434f5da
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/component/search/facet/__tests__/FacetedSearch.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand All @@ -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);
Expand All @@ -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();
Expand Down Expand Up @@ -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(() => {
Expand All @@ -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();
Expand Down

0 comments on commit 434f5da

Please sign in to comment.