@@ -1396,47 +1396,47 @@ describe("Select general interaction", () => {
1396
1396
1397
1397
it ( "navigates with ArrowDown when initial value does not match any option" , ( ) => {
1398
1398
cy . mount (
1399
- < Select id = "sel-down" value = "missing" >
1399
+ < Select value = "missing" >
1400
1400
< Option value = "A" > A</ Option >
1401
1401
< Option value = "B" > B</ Option >
1402
1402
< Option value = "C" > C</ Option >
1403
1403
</ Select >
1404
1404
) ;
1405
1405
1406
- cy . get ( "#sel-down " )
1407
- . should ( "have.attr " , "value" , "missing" )
1406
+ cy . get ( "[ui5-select] " )
1407
+ . should ( "have.prop " , "value" , "missing" )
1408
1408
. find ( "[ui5-option][selected]" )
1409
1409
. should ( "not.exist" ) ;
1410
1410
1411
- cy . get ( "#sel-down " ) . realClick ( ) . realPress ( "ArrowDown" ) ;
1411
+ cy . get ( "[ui5-select] " ) . realClick ( ) . realPress ( "ArrowDown" ) ;
1412
1412
1413
- cy . get ( "#sel-down " )
1413
+ cy . get ( "[ui5-select] " )
1414
1414
. find ( "[ui5-option]" )
1415
1415
. eq ( 0 )
1416
1416
. should ( "have.attr" , "selected" ) ;
1417
- cy . get ( "#sel-down " ) . should ( "have.prop" , "value" , "A" ) ;
1417
+ cy . get ( "[ui5-select] " ) . should ( "have.prop" , "value" , "A" ) ;
1418
1418
} ) ;
1419
1419
1420
1420
it ( "navigates with ArrowUp when initial value does not match any option" , ( ) => {
1421
1421
cy . mount (
1422
- < Select id = "sel-up" value = "missing" >
1422
+ < Select value = "missing" >
1423
1423
< Option value = "A" > A</ Option >
1424
1424
< Option value = "B" > B</ Option >
1425
1425
< Option value = "C" > C</ Option >
1426
1426
</ Select >
1427
1427
) ;
1428
1428
1429
- cy . get ( "#sel-up " )
1430
- . should ( "have.attr " , "value" , "missing" )
1429
+ cy . get ( "[ui5-select] " )
1430
+ . should ( "have.prop " , "value" , "missing" )
1431
1431
. find ( "[ui5-option][selected]" )
1432
1432
. should ( "not.exist" ) ;
1433
1433
1434
- cy . get ( "#sel-up " ) . realClick ( ) . realPress ( "ArrowUp" ) ;
1434
+ cy . get ( "[ui5-select] " ) . realClick ( ) . realPress ( "ArrowUp" ) ;
1435
1435
1436
- cy . get ( "#sel-up " )
1436
+ cy . get ( "[ui5-select] " )
1437
1437
. find ( "[ui5-option]" )
1438
1438
. eq ( 2 )
1439
1439
. should ( "have.attr" , "selected" ) ;
1440
- cy . get ( "#sel-up " ) . should ( "have.prop" , "value" , "C" ) ;
1440
+ cy . get ( "[ui5-select] " ) . should ( "have.prop" , "value" , "C" ) ;
1441
1441
} ) ;
1442
1442
} ) ;
0 commit comments