Content-Length: 319722 | pFad | http://github.com/coder/coder/commit/e093d851f2cbc32a1123c8ff017c6e7bff9cb7df

DA fix: select dropdown by button instead of combobox · coder/coder@e093d85 · GitHub
Skip to content

Commit e093d85

Browse files
committed
fix: select dropdown by button instead of combobox
1 parent ab10d5d commit e093d85

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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/coder/coder/commit/e093d851f2cbc32a1123c8ff017c6e7bff9cb7df

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy