Skip to content

Commit b8694f8

Browse files
committed
fix: select dropdown by button instead of combobox
1 parent b2d155b commit b8694f8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ describe("CreateWorkspacePageExperimental", () => {
277277

278278
expect(mockWebSocket.send).toBeDefined();
279279

280-
const instanceTypeSelect = screen.getByRole("combobox", {
280+
const instanceTypeSelect = screen.getByRole("button", {
281281
name: /instance type/i,
282282
});
283283
expect(instanceTypeSelect).toBeInTheDocument();
@@ -422,16 +422,16 @@ describe("CreateWorkspacePageExperimental", () => {
422422

423423
expect(screen.getByText(/instance type/i)).toBeInTheDocument();
424424

425-
const select = screen.getByRole("combobox", { name: /instance type/i });
425+
const select = screen.getByRole("button", { name: /instance type/i });
426426

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

431-
// Each option appears in both the trigger and the dropdown
432-
expect(screen.getAllByText(/t3\.micro/i)).toHaveLength(2);
433-
expect(screen.getAllByText(/t3\.small/i)).toHaveLength(2);
434-
expect(screen.getAllByText(/t3\.medium/i)).toHaveLength(2);
431+
// Options appear only in the dropdown when no value is selected
432+
expect(screen.getByText(/t3\.micro/i)).toBeInTheDocument();
433+
expect(screen.getByText(/t3\.small/i)).toBeInTheDocument();
434+
expect(screen.getByText(/t3\.medium/i)).toBeInTheDocument();
435435
});
436436

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy