diff --git a/site/src/components/MultiSelectCombobox/MultiSelectCombobox.stories.tsx b/site/src/components/MultiSelectCombobox/MultiSelectCombobox.stories.tsx index 4480e833a4c..2c6eb556a0b 100644 --- a/site/src/components/MultiSelectCombobox/MultiSelectCombobox.stories.tsx +++ b/site/src/components/MultiSelectCombobox/MultiSelectCombobox.stories.tsx @@ -131,7 +131,9 @@ export const ClearFirstSelectedItem: Story = { await userEvent.click( canvas.getByRole("option", { name: "My Organization 2" }), ); - await userEvent.click(canvas.getAllByTestId("clear-option-button")[0]); + await userEvent.click( + canvas.getByRole("button", { name: "Remove My Organization" }), + ); }, }; @@ -142,13 +144,7 @@ export const ClearAllComboboxItems: Story = { await userEvent.click( canvas.getByRole("option", { name: "My Organization" }), ); - await userEvent.click(canvas.getByTestId("clear-all-button")); - - await waitFor(() => - expect( - canvas.getByPlaceholderText("Select organization"), - ).toBeInTheDocument(), - ); + await userEvent.click(canvas.getByRole("button", { name: "Clear all" })); }, }; diff --git a/site/src/components/MultiSelectCombobox/MultiSelectCombobox.tsx b/site/src/components/MultiSelectCombobox/MultiSelectCombobox.tsx index 2472657a412..afa8a101690 100644 --- a/site/src/components/MultiSelectCombobox/MultiSelectCombobox.tsx +++ b/site/src/components/MultiSelectCombobox/MultiSelectCombobox.tsx @@ -484,12 +484,13 @@ export const MultiSelectCombobox: React.FC = ({