Skip to content

Commit 40ac6b6

Browse files
committed
chore: increase timeout for failing test
1 parent 0109290 commit 40ac6b6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

libs/react-components/specs/dropdown.browser.spec.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ describe("Dropdown Component", () => {
1212
describe("Dropdown", () => {
1313

1414
it("should render with the default props", async () => {
15+
1516
// Setup
1617

1718
const Component = () => {
@@ -294,7 +295,6 @@ describe("Dropdown Component", () => {
294295

295296
const result = render(<Component />);
296297
const filter = result.getByTestId("input");
297-
const itemLocator = result.getByTestId(/^dropdown-item/);
298298

299299
// Actions
300300

@@ -469,19 +469,20 @@ describe("Dropdown Component", () => {
469469
};
470470

471471
const result = render(<Component />);
472-
const filter = result.getByRole("combobox");
472+
const filter = result.getByTestId("input");
473+
const filteredOptions = result.getByRole("option");
473474

474475
// Actions
475476
await filter.fill("2");
476477
await filter.click();
477478

478479
// Result
479480
await vi.waitFor(() => {
480-
const visibleOptions = result.getByRole("option");
481-
expect(visibleOptions.elements().length).toBe(1);
482-
const el = visibleOptions.elements()[0] as HTMLElement;
481+
expect(filteredOptions.elements().length).toBe(1);
482+
483+
const el = filteredOptions.elements()[0] as HTMLElement;
483484
expect(el.getAttribute("data-value")).toBe("2");
484-
});
485+
}, 2000);
485486
});
486487
});
487488
});

0 commit comments

Comments
 (0)