@@ -418,23 +418,18 @@ describe("CreateWorkspacePageExperimental", () => {
418
418
renderCreateWorkspacePageExperimental ( ) ;
419
419
await waitForLoaderToBeRemoved ( ) ;
420
420
421
- expect ( screen . getByText ( "Instance Type" ) ) . toBeInTheDocument ( ) ;
421
+ expect ( screen . getByText ( / i n s t a n c e t y p e / i ) ) . toBeInTheDocument ( ) ;
422
422
423
- const select = screen . getByText ( / i n s t a n c e t y p e / i)
423
+ const select = screen . getByText ( / i n s t a n c e t y p e / i) ;
424
424
425
425
await waitFor ( async ( ) => {
426
426
await userEvent . click ( select ) ;
427
427
} ) ;
428
428
429
- expect (
430
- screen . getByRole ( "option" , { name :/ t 3 \. m i c r o / i} ) ,
431
- ) . toBeInTheDocument ( ) ;
432
- expect (
433
- screen . getByRole ( "option" , { name :/ t 3 \. s m a l l / i} ) ,
434
- ) . toBeInTheDocument ( ) ;
435
- expect (
436
- screen . getByRole ( "option" , { name :/ t 3 \. m e d i u m / i} ) ,
437
- ) . toBeInTheDocument ( ) ;
429
+ // Each option appears in both the trigger and the dropdown
430
+ expect ( screen . getAllByText ( / t 3 \. m i c r o / i) ) . toHaveLength ( 2 ) ;
431
+ expect ( screen . getAllByText ( / t 3 \. s m a l l / i) ) . toHaveLength ( 2 ) ;
432
+ expect ( screen . getAllByText ( / t 3 \. m e d i u m / i) ) . toHaveLength ( 2 ) ;
438
433
} ) ;
439
434
440
435
it ( "renders number parameter with slider" , async ( ) => {