Skip to content

Commit 68b1f36

Browse files
committed
fix: fix tests
1 parent 49c6a07 commit 68b1f36

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

site/src/pages/CreateWorkspacePage/CreateWorkspacePageExperimental.test.tsx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -418,23 +418,18 @@ describe("CreateWorkspacePageExperimental", () => {
418418
renderCreateWorkspacePageExperimental();
419419
await waitForLoaderToBeRemoved();
420420

421-
expect(screen.getByText("Instance Type")).toBeInTheDocument();
421+
expect(screen.getByText(/instance type/i)).toBeInTheDocument();
422422

423-
const select = screen.getByText(/instance type/i)
423+
const select = screen.getByText(/instance type/i);
424424

425425
await waitFor(async () => {
426426
await userEvent.click(select);
427427
});
428428

429-
expect(
430-
screen.getByRole("option", { name: /t3\.micro/i }),
431-
).toBeInTheDocument();
432-
expect(
433-
screen.getByRole("option", { name: /t3\.small/i }),
434-
).toBeInTheDocument();
435-
expect(
436-
screen.getByRole("option", { name: /t3\.medium/i }),
437-
).toBeInTheDocument();
429+
// Each option appears in both the trigger and the dropdown
430+
expect(screen.getAllByText(/t3\.micro/i)).toHaveLength(2);
431+
expect(screen.getAllByText(/t3\.small/i)).toHaveLength(2);
432+
expect(screen.getAllByText(/t3\.medium/i)).toHaveLength(2);
438433
});
439434

440435
it("renders number parameter with slider", async () => {

0 commit comments

Comments
 (0)