@@ -25,8 +25,7 @@ describe("Select general interaction", () => {
25
25
const EXPECTED_SELECTION_TEXT = "Cozy" ;
26
26
27
27
await select . click ( ) ;
28
- const popover = await select . shadow$ ( "ui5-responsive-popover" ) ;
29
- const firstItem = ( await popover . $$ ( "ui5-li" ) ) [ 0 ] ;
28
+ const firstItem = ( await browser . $$ ( "#mySelect ui5-option" ) ) [ 0 ] ;
30
29
31
30
await firstItem . click ( ) ;
32
31
@@ -42,8 +41,7 @@ describe("Select general interaction", () => {
42
41
const EXPECTED_SELECTION_TEXT = "Condensed" ;
43
42
44
43
await select . click ( ) ;
45
- const popover = await select . shadow$ ( "ui5-responsive-popover" ) ;
46
- const secondItem = ( await popover . $$ ( "ui5-li" ) ) [ 1 ] ;
44
+ const secondItem = ( await browser . $$ ( "#selectPrevent ui5-option" ) ) [ 1 ] ;
47
45
48
46
await secondItem . click ( ) ;
49
47
@@ -60,9 +58,8 @@ describe("Select general interaction", () => {
60
58
61
59
await select . click ( ) ;
62
60
63
- const popover = await select . shadow$ ( "ui5-responsive-popover" ) ;
64
- const firstItem = await popover . $ ( "ui5-li:last-child" ) ;
65
- await firstItem . click ( ) ;
61
+ const lastItem = await browser . $ ( "#mySelect ui5-option:last-child" )
62
+ await lastItem . click ( ) ;
66
63
67
64
assert . strictEqual ( await inputResult . getProperty ( "value" ) , "" , "Event not fired when already selected item is selected" ) ;
68
65
} ) ;
@@ -436,9 +433,7 @@ describe("Select general interaction", () => {
436
433
await addItemsBtn . click ( ) ;
437
434
438
435
const firstOption = await browser . $ ( "#mySelect ui5-option:first-child" ) ;
439
- const select = await browser . $ ( "#mySelect" ) ;
440
- const popover = await select . shadow$ ( "ui5-responsive-popover" ) ;
441
- const firstListItem = await popover . $ ( "ui5-li:first-child" ) ;
436
+ const firstListItem = ( await browser . $ ( "#mySelect ui5-option:first-child" ) )
442
437
443
438
assert . ok ( await firstOption . getProperty ( "selected" ) , "First option should be selected" ) ;
444
439
assert . ok ( await firstListItem . getProperty ( "selected" ) , "First list item should be selected" ) ;
@@ -493,8 +488,7 @@ describe("Select general interaction", () => {
493
488
await select . keys ( "Escape" ) ;
494
489
495
490
await select . click ( ) ;
496
- const popover = await select . shadow$ ( "ui5-responsive-popover" ) ;
497
- const firstItem = await popover . $ ( "ui5-li:first-child" ) ;
491
+ const firstItem = await browser . $ ( "#mySelect ui5-option:first-child" ) ;
498
492
499
493
await firstItem . click ( ) ;
500
494
@@ -508,9 +502,8 @@ describe("Select general interaction", () => {
508
502
const EXPECTED_SELECTION_TEXT2 = "Condensed" ;
509
503
510
504
await select . click ( ) ;
511
- const popover = await select . shadow$ ( "ui5-responsive-popover" ) ;
512
- const firstItem = ( await popover . $$ ( "ui5-li" ) ) [ 0 ] ;
513
- const thirdItem = ( await popover . $$ ( "ui5-li" ) ) [ 2 ] ;
505
+ const firstItem = await browser . $ ( "#mySelectEsc ui5-option:first-child" ) ;
506
+ const thirdItem = ( await browser . $$ ( "#mySelectEsc ui5-option" ) ) [ 2 ] ;
514
507
515
508
await firstItem . click ( ) ;
516
509
@@ -584,7 +577,7 @@ describe("Select general interaction", () => {
584
577
it ( "Tests that the picker is closed when the selected value is clicked" , async ( ) => {
585
578
const select = await browser . $ ( "#mySelect" ) ;
586
579
const popover = await select . shadow$ ( "ui5-responsive-popover" ) ;
587
- const firstItem = ( await popover . $$ ( " ui5-li" ) ) [ 0 ] ;
580
+ const firstItem = await browser . $ ( "#mySelect ui5-option:first-child" ) ;
588
581
589
582
// select the first item
590
583
await select . click ( ) ;
@@ -612,37 +605,7 @@ describe("Select general interaction", () => {
612
605
await select . keys ( "ArrowDown" ) ;
613
606
await select . keys ( "ArrowDown" ) ;
614
607
615
- const selectedOption = await popover . $ ( "ui5-list" ) . $ ( "ui5-li [selected]") ;
608
+ const selectedOption = await browser . $ ( "#warningSelect ui5-option [selected]" ) ;
616
609
assert . ok ( await selectedOption . isClickable ( ) , "Selected option is visible in the viewport." ) ;
617
610
} ) ;
618
- } ) ;
619
-
620
- describe ( "Attributes propagation" , ( ) => {
621
- before ( async ( ) => {
622
- await browser . url ( `test/pages/Select.html` ) ;
623
- } ) ;
624
-
625
- it ( "propagates additional-text attribute" , async ( ) => {
626
- const select = await browser . $ ( "#mySelect6" ) ;
627
- const EXPECTED_ADDITIONAL_TEXT = "DZ" ,
628
- firstOption = await browser . $ ( "#mySelect6 ui5-option:first-child" ) ,
629
- firstItem = ( await select . shadow$$ ( "ui5-li" ) ) [ 0 ] ;
630
-
631
- assert . strictEqual ( await firstOption . getProperty ( "additionalText" ) , EXPECTED_ADDITIONAL_TEXT , "The additional text is set" ) ;
632
- assert . strictEqual ( await firstItem . getProperty ( "additionalText" ) , EXPECTED_ADDITIONAL_TEXT , "The additional text is correct" ) ;
633
- } ) ;
634
-
635
- it ( "Tooltip propagation" , async ( ) => {
636
- const select = await browser . $ ( "#selectTooltip" ) ;
637
- const tooltip = "Cozy"
638
-
639
- await select . click ( ) ;
640
-
641
- const popover = await select . shadow$ ( "[ui5-responsive-popover]" ) ;
642
- const option = await select . $ ( "[ui5-option]" ) ;
643
- const listItem = await popover . $ ( "[data-ui5-stable='tooltip-test-option']" )
644
-
645
- assert . strictEqual ( await option . getProperty ( "tooltip" ) , tooltip , "Tooltip is correct" ) ;
646
- assert . strictEqual ( await listItem . getProperty ( "tooltip" ) , tooltip , "Tooltip is correctly propagated" ) ;
647
- } ) ;
648
- } ) ;
611
+ } ) ;
0 commit comments