Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
Fix; unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sbracegirdle committed Jun 25, 2024
1 parent f2c004d commit ee38506
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/Dropdown/Dropdown.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe("Dropdown Component", () => {
);
const input = getByRole("textbox");

fireEvent.click(input);
fireEvent.focus(input);

await waitFor(() => {
expect(getByText("Option 1")).toBeInTheDocument();
Expand All @@ -41,7 +41,7 @@ describe("Dropdown Component", () => {
);
const input = getByRole("textbox");

fireEvent.click(input);
fireEvent.focus(input);
const option1 = getByText("Option 1");
fireEvent.click(option1);

Expand All @@ -54,7 +54,7 @@ describe("Dropdown Component", () => {
);
const input = getByRole("textbox");

fireEvent.click(input);
fireEvent.focus(input);
const option1 = getByText("Option 1");
fireEvent.click(option1);

Expand All @@ -66,7 +66,7 @@ describe("Dropdown Component", () => {
it("renders search input when hasSearch is true", () => {
const {getByRole} = render(<Dropdown label="Dropdown" options={options} hasSearch />);
const input = getByRole("textbox");
fireEvent.click(input);
fireEvent.focus(input);

const searchInput = getByRole("searchbox");
expect(searchInput).toBeInTheDocument();
Expand All @@ -83,7 +83,7 @@ describe("Dropdown Component", () => {
/>
);
const input = getByRole("textbox");
fireEvent.click(input);
fireEvent.focus(input);

const clearButton = getByText("Clear Selection");
fireEvent.click(clearButton);
Expand All @@ -102,7 +102,7 @@ describe("Dropdown Component", () => {
/>
);
const input = getByRole("textbox");
fireEvent.click(input);
fireEvent.focus(input);

const clearButton = getByText("Select All");
fireEvent.click(clearButton);
Expand All @@ -120,7 +120,7 @@ describe("Dropdown Component", () => {
/>
);
const input = getByRole("textbox");
fireEvent.click(input);
fireEvent.focus(input);

await waitFor(() => {
expect(getByText("inline-loading")).toBeInTheDocument();
Expand Down

0 comments on commit ee38506

Please sign in to comment.