Skip to content

Commit

Permalink
project errors
Browse files Browse the repository at this point in the history
  • Loading branch information
steezeburger committed Jan 11, 2025
1 parent 9cee4ec commit 9267b15
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions apps/web/app/components/Dropdown/Dropdown.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ describe("Dropdown Component", () => {
render(<Dropdown options={mockOptions} onSelect={() => {}} />);
const dropdownButtons = screen.getAllByRole("button");
const dropdownButton = dropdownButtons[0];
if (!dropdownButton) {
throw new Error("Dropdown button not found");
}
fireEvent.click(dropdownButton);
expect(screen.getByRole("menu")).toBeInTheDocument();
});
Expand All @@ -35,6 +38,9 @@ describe("Dropdown Component", () => {

const dropdownButtons = screen.getAllByRole("button");
const dropdownButton = dropdownButtons[0];
if (!dropdownButton) {
throw new Error("Dropdown button not found");
}
fireEvent.click(dropdownButton);

const option = screen.getByText("Option 1");
Expand All @@ -53,6 +59,9 @@ describe("Dropdown Component", () => {
render(<Dropdown options={mockOptions} onSelect={() => {}} />);
const dropdownButtons = screen.getAllByRole("button");
const dropdownButton = dropdownButtons[0];
if (!dropdownButton) {
throw new Error("Dropdown button not found");
}
fireEvent.click(dropdownButton);

const selectedOption = screen.getByText("Option 3");
Expand All @@ -68,6 +77,9 @@ describe("Dropdown Component", () => {

const dropdownButtons = screen.getAllByRole("button");
const dropdownButton = dropdownButtons[0];
if (!dropdownButton) {
throw new Error("Dropdown button not found");
}
fireEvent.click(dropdownButton);

const option = screen.getByText("Option 3");
Expand Down

0 comments on commit 9267b15

Please sign in to comment.