Skip to content

Commit

Permalink
no default input search term on AppellationAutocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
enguerranws committed Feb 13, 2025
1 parent c171496 commit b41fc03
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ export const AppellationAutocomplete = ({

const [selectedOption, setSelectedOption] =
useState<AppellationMatchDto | null>(initialOption);
const [searchTerm, setSearchTerm] = useState<string>(
initialValue?.appellationLabel ?? "",
);
const [searchTerm, setSearchTerm] = useState<string>("");
const [options, setOptions] = useState<AppellationMatchDto[]>([]);
const [isSearching, setIsSearching] = useState(false);
const debounceSearchTerm = useDebounce(searchTerm);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ export const MultipleAppellationInput = ({
onAppellationClear={() => {
onAppellationDelete(index);
}}
id={`${id}-${index}`}
selectProps={{
inputId: `${id}-${index}`,
}}
/>
</div>
<Button
Expand Down
6 changes: 4 additions & 2 deletions playwright/tests/establishment/manageEstablishment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,10 @@ const checkEstablishment = async (

await expect(
await page
.locator(`#${domElementIds.establishment.admin.appellations} input`)
.inputValue(),
.locator(
`#${domElementIds.establishment.admin.appellations}-0-wrapper .im-select__single-value`,
)
.innerText(),
).toContain("Bûcheron");

await expect(
Expand Down

0 comments on commit b41fc03

Please sign in to comment.