diff --git a/packages/code-du-travail-frontend/src/modules/common/Autocomplete/Autocomplete.tsx b/packages/code-du-travail-frontend/src/modules/common/Autocomplete/Autocomplete.tsx index 52d77c840a..87025e2a27 100644 --- a/packages/code-du-travail-frontend/src/modules/common/Autocomplete/Autocomplete.tsx +++ b/packages/code-du-travail-frontend/src/modules/common/Autocomplete/Autocomplete.tsx @@ -150,32 +150,26 @@ export const Autocomplete = ({ {value.length > 1 && (isOpen && suggestions.length ? suggestions.map((item, index) => ( - <> -
  • - {lineAsLink ? ( - - {displayLabel(item)} - - ) : ( - <>{displayLabel(item)} - )} -
  • - +
  • + {lineAsLink ? ( + + {displayLabel(item)} + + ) : ( + <>{displayLabel(item)} + )} +
  • )) : displayNoResult && !selectedResult && ( - <> -
  • - <>Aucun résultat -
  • - +
  • Aucun résultat
  • ))} diff --git a/packages/code-du-travail-frontend/src/modules/home/__tests__/HomeSearch.test.tsx b/packages/code-du-travail-frontend/src/modules/home/__tests__/HomeSearch.test.tsx index 28a9d0c40f..de06ccee17 100644 --- a/packages/code-du-travail-frontend/src/modules/home/__tests__/HomeSearch.test.tsx +++ b/packages/code-du-travail-frontend/src/modules/home/__tests__/HomeSearch.test.tsx @@ -1,13 +1,11 @@ import { HomeSearch } from "../Components"; import { fireEvent, render, waitFor } from "@testing-library/react"; import React from "react"; -import { byTestId } from "testing-library-selector"; +import { byTestId, byLabelText } from "testing-library-selector"; import { fetchSuggestResults } from "../../layout/header/fetchSuggestResults"; import { useLayoutTracking } from "../../layout/tracking"; import { UserAction } from "../../../common"; -const pushRouter = jest.fn(); - jest.mock("../../layout/header/fetchSuggestResults"); jest.mock("../../layout/tracking");