@@ -277,7 +277,7 @@ describe("CreateWorkspacePageExperimental", () => {
277
277
278
278
expect ( mockWebSocket . send ) . toBeDefined ( ) ;
279
279
280
- const instanceTypeSelect = screen . getByRole ( "combobox " , {
280
+ const instanceTypeSelect = screen . getByRole ( "button " , {
281
281
name : / i n s t a n c e t y p e / i,
282
282
} ) ;
283
283
expect ( instanceTypeSelect ) . toBeInTheDocument ( ) ;
@@ -422,16 +422,16 @@ describe("CreateWorkspacePageExperimental", () => {
422
422
423
423
expect ( screen . getByText ( / i n s t a n c e t y p e / i) ) . toBeInTheDocument ( ) ;
424
424
425
- const select = screen . getByRole ( "combobox " , { name : / i n s t a n c e t y p e / i } ) ;
425
+ const select = screen . getByRole ( "button " , { name : / i n s t a n c e t y p e / i } ) ;
426
426
427
427
await waitFor ( async ( ) => {
428
428
await userEvent . click ( select ) ;
429
429
} ) ;
430
430
431
- // Each option appears in both the trigger and the dropdown
432
- expect ( screen . getAllByText ( / t 3 \. m i c r o / i) ) . toHaveLength ( 2 ) ;
433
- expect ( screen . getAllByText ( / t 3 \. s m a l l / i) ) . toHaveLength ( 2 ) ;
434
- expect ( screen . getAllByText ( / t 3 \. m e d i u m / i) ) . toHaveLength ( 2 ) ;
431
+ // Options appear only in the dropdown when no value is selected
432
+ expect ( screen . getByText ( / t 3 \. m i c r o / i) ) . toBeInTheDocument ( ) ;
433
+ expect ( screen . getByText ( / t 3 \. s m a l l / i) ) . toBeInTheDocument ( ) ;
434
+ expect ( screen . getByText ( / t 3 \. m e d i u m / i) ) . toBeInTheDocument ( ) ;
435
435
} ) ;
436
436
437
437
it ( "renders number parameter with slider" , async ( ) => {
0 commit comments