@@ -111,21 +111,21 @@ describe('AnalyticalTable', () => {
111
111
112
112
cy . findByText ( 'Name' ) . click ( ) ;
113
113
cy . get ( '[ui5-popover]' ) . should ( 'be.visible' ) ;
114
- cy . findByText ( 'Sort Ascending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
114
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Ascending' ) ;
115
115
cy . get ( '@onSortSpy' ) . should ( 'have.been.calledWithMatch' , {
116
116
detail : { column : { id : 'name' } , sortDirection : 'asc' }
117
117
} ) ;
118
118
cy . get ( '[aria-rowindex="3"] > [aria-colindex="1"]' ) . should ( 'text' , 'C' ) ;
119
119
120
120
cy . findByText ( 'Name' ) . click ( ) ;
121
- cy . findByText ( 'Clear Sorting ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
121
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Clear Sorting' ) ;
122
122
cy . get ( '@onSortSpy' ) . should ( 'have.been.calledWithMatch' , {
123
123
detail : { column : { id : 'name' } , sortDirection : 'clear' }
124
124
} ) ;
125
125
cy . get ( '[aria-rowindex="3"] > [aria-colindex="1"]' ) . should ( 'text' , 'X' ) ;
126
126
127
127
cy . findByText ( 'Name' ) . click ( ) ;
128
- cy . findByText ( 'Sort Descending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
128
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Descending' ) ;
129
129
cy . get ( '@onSortSpy' ) . should ( 'have.been.calledWithMatch' , {
130
130
detail : { column : { id : 'name' } , sortDirection : 'desc' }
131
131
} ) ;
@@ -873,7 +873,7 @@ describe('AnalyticalTable', () => {
873
873
cy . findByTestId ( 'isSelected' ) . should ( 'have.text' , 'true' ) ;
874
874
875
875
cy . findByText ( 'Friend Name' ) . click ( ) ;
876
- cy . findByText ( 'Group ') . realClick ( ) ;
876
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Group' ) ;
877
877
cy . focused ( )
878
878
. should ( 'have.attr' , 'data-row-index' , '0' )
879
879
. and ( 'have.attr' , 'data-column-index' , '2' )
@@ -894,7 +894,7 @@ describe('AnalyticalTable', () => {
894
894
cy . findByTestId ( 'isSelected' ) . should ( 'have.text' , 'false' ) ;
895
895
896
896
cy . findByText ( 'Friend Name' ) . click ( ) ;
897
- cy . findByText ( 'Ungroup ') . realClick ( ) ;
897
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Ungroup' ) ;
898
898
cy . focused ( )
899
899
. should ( 'have.attr' , 'data-row-index' , '0' )
900
900
. and ( 'have.attr' , 'data-column-index' , '3' )
@@ -1560,7 +1560,7 @@ describe('AnalyticalTable', () => {
1560
1560
1561
1561
testAlternateRowColor ( ) ;
1562
1562
cy . findByText ( 'Name' ) . click ( ) ;
1563
- cy . findByText ( 'Sort Ascending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
1563
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Ascending' ) ;
1564
1564
testAlternateRowColor ( ) ;
1565
1565
} ) ;
1566
1566
@@ -2336,22 +2336,22 @@ describe('AnalyticalTable', () => {
2336
2336
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="1"]' ) . should ( 'have.attr' , 'aria-label' , 'Age 40 ' ) ;
2337
2337
2338
2338
cy . findByText ( 'Name' ) . click ( ) ;
2339
- cy . findByText ( 'Sort Ascending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2339
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Ascending' ) ;
2340
2340
cy . get ( '[data-column-id="name"]' ) . should ( 'have.attr' , 'aria-sort' , 'ascending' ) ;
2341
2341
cy . findByText ( 'Name' ) . click ( ) ;
2342
- cy . findByText ( 'Clear Sorting ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2342
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Clear Sorting' ) ;
2343
2343
cy . get ( '[data-column-id="name"]' ) . should ( 'not.have.attr' , 'aria-sort' ) ;
2344
2344
cy . findByText ( 'Name' ) . click ( ) ;
2345
- cy . findByText ( 'Sort Descending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2345
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Descending' ) ;
2346
2346
cy . get ( '[data-column-id="name"]' ) . should ( 'have.attr' , 'aria-sort' , 'descending' ) ;
2347
2347
cy . findByText ( 'Name' ) . click ( ) ;
2348
- cy . findByText ( ' Sort Ascending') . shadow ( ) . get ( '[ui5-input]' ) . typeIntoUi5Input ( 'A{enter}' ) ;
2348
+ cy . get ( '[text=" Sort Ascending"] ') . shadow ( ) . get ( '[ui5-input]' ) . typeIntoUi5Input ( 'A{enter}' ) ;
2349
2349
cy . get ( '[data-column-id="name"]' )
2350
2350
. should ( 'have.attr' , 'aria-sort' , 'descending' )
2351
2351
. and ( 'have.attr' , 'aria-label' , 'Filtered' ) ;
2352
2352
2353
2353
cy . findByText ( 'Name' ) . click ( ) ;
2354
- cy . findByText ( 'Group ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2354
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Group' ) ;
2355
2355
cy . get ( '[data-column-id="name"]' )
2356
2356
. should ( 'have.attr' , 'aria-sort' , 'descending' )
2357
2357
. and ( 'have.attr' , 'aria-label' , 'Filtered Grouped' ) ;
@@ -2367,14 +2367,14 @@ describe('AnalyticalTable', () => {
2367
2367
'Name A Grouped, To collapse the row, press the spacebar.'
2368
2368
) ;
2369
2369
cy . findByText ( 'Name' ) . click ( ) ;
2370
- cy . findByText ( 'Ungroup ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2370
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Ungroup' ) ;
2371
2371
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="0"]' ) . should ( 'have.attr' , 'aria-label' , 'Name A ' ) ;
2372
2372
cy . get ( '[data-column-id="name"]' )
2373
2373
. should ( 'have.attr' , 'aria-sort' , 'descending' )
2374
2374
. and ( 'have.attr' , 'aria-label' , 'Filtered' ) ;
2375
2375
2376
2376
cy . findByText ( 'Name' ) . click ( ) ;
2377
- cy . findByText ( ' Sort Ascending') . shadow ( ) . get ( '[ui5-input]' ) . typeIntoUi5Input ( '{selectall}{backspace}{enter}' ) ;
2377
+ cy . get ( '[text=" Sort Ascending"] ') . shadow ( ) . get ( '[ui5-input]' ) . typeIntoUi5Input ( '{selectall}{backspace}{enter}' ) ;
2378
2378
cy . get ( '[data-column-id="name"]' ) . should ( 'have.attr' , 'aria-sort' , 'descending' ) . and ( 'have.attr' , 'aria-label' , '' ) ;
2379
2379
2380
2380
cy . get ( '[data-column-id="friend.age"]' ) . should ( 'have.attr' , 'aria-label' , 'Custom Label ' ) ;
@@ -2436,7 +2436,7 @@ describe('AnalyticalTable', () => {
2436
2436
2437
2437
cy . mount ( < AnalyticalTable data = { [ ...data , ...data ] } columns = { columns } visibleRows = { 5 } groupable /> ) ;
2438
2438
cy . findByText ( 'Name' ) . click ( ) ;
2439
- cy . findByText ( 'Group ') . realClick ( ) ;
2439
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Group' ) ;
2440
2440
cy . findByText ( 'A (2)' ) . trigger ( 'keydown' , {
2441
2441
key : 'Enter'
2442
2442
} ) ;
@@ -2522,9 +2522,9 @@ describe('AnalyticalTable', () => {
2522
2522
2523
2523
//sort both Name and Age (multi-sort enabled)
2524
2524
cy . findByText ( 'Name' ) . click ( ) ;
2525
- cy . findByText ( 'Sort Ascending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2525
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Ascending' ) ;
2526
2526
cy . findByText ( 'Age' ) . click ( ) ;
2527
- cy . findByText ( 'Sort Ascending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2527
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Ascending' ) ;
2528
2528
2529
2529
cy . get ( '[data-column-index="0"][data-row-index="1"]' ) . children ( ) . should ( 'have.text' , 'A' ) ;
2530
2530
cy . get ( '[data-column-index="1"][data-row-index="1"]' ) . children ( ) . should ( 'have.text' , '30' ) ;
@@ -2545,7 +2545,7 @@ describe('AnalyticalTable', () => {
2545
2545
2546
2546
//only sort Name2
2547
2547
cy . findByText ( 'Name 2' ) . click ( ) ;
2548
- cy . findByText ( 'Sort Ascending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2548
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Ascending' ) ;
2549
2549
2550
2550
cy . get ( '[data-column-index="0"][data-row-index="1"]' ) . children ( ) . should ( 'have.text' , 'B' ) ;
2551
2551
cy . get ( '[data-column-index="1"][data-row-index="1"]' ) . children ( ) . should ( 'have.text' , '60' ) ;
@@ -2753,7 +2753,7 @@ describe('AnalyticalTable', () => {
2753
2753
cy . findByText ( 'Aggregated' ) . should ( 'not.exist' ) ;
2754
2754
2755
2755
cy . findByText ( 'Name' ) . click ( ) ;
2756
- cy . findByText ( 'Group ') . realClick ( ) ;
2756
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Group' ) ;
2757
2757
cy . findByText ( 'Simon' ) . should ( 'be.visible' ) . should ( 'have.length' , 1 ) ;
2758
2758
cy . findAllByText ( 'Aggregated' ) . should ( 'be.visible' ) . should ( 'have.length' , 2 ) ;
2759
2759
cy . get ( '[ui5-icon][name="navigation-right-arrow"]' ) . should ( 'be.visible' ) . should ( 'have.length' , 2 ) ;
@@ -2815,17 +2815,17 @@ describe('AnalyticalTable', () => {
2815
2815
2816
2816
cy . mount ( < TestComponent orderedIds = { [ 'name' , 'name2' , 'age' , 'age2' ] } /> ) ;
2817
2817
cy . findByText ( 'Age' ) . click ( ) ;
2818
- cy . findByText ( 'Sort Ascending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2818
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Ascending' ) ;
2819
2819
cy . findByText ( 'Name' ) . click ( ) ;
2820
- cy . findByText ( 'Sort Ascending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2820
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Ascending' ) ;
2821
2821
2822
2822
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="0"]' ) . should ( 'have.text' , 'Graham' ) ;
2823
2823
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="1"]' ) . should ( 'have.text' , '40' ) ;
2824
2824
cy . get ( '[data-visible-row-index="5"][data-visible-column-index="0"]' ) . should ( 'have.text' , 'Kristen' ) ;
2825
2825
cy . get ( '[data-visible-row-index="5"][data-visible-column-index="1"]' ) . should ( 'have.text' , '20' ) ;
2826
2826
2827
2827
cy . findByText ( 'Name 2' ) . click ( ) ;
2828
- cy . findByText ( 'Sort Descending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2828
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Descending' ) ;
2829
2829
2830
2830
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="0"]' ) . should ( 'have.text' , 'Graham' ) ;
2831
2831
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="1"]' ) . should ( 'have.text' , '62' ) ;
@@ -2835,7 +2835,7 @@ describe('AnalyticalTable', () => {
2835
2835
cy . get ( '[data-visible-row-index="5"][data-visible-column-index="2"]' ) . should ( 'have.text' , 'Willis' ) ;
2836
2836
2837
2837
cy . findByText ( 'Name 2' ) . click ( ) ;
2838
- cy . findByText ( 'Clear Sorting ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2838
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Clear Sorting' ) ;
2839
2839
2840
2840
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="0"]' ) . should ( 'have.text' , 'Graham' ) ;
2841
2841
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="1"]' ) . should ( 'have.text' , '40' ) ;
@@ -2844,17 +2844,17 @@ describe('AnalyticalTable', () => {
2844
2844
2845
2845
cy . mount ( < TestComponent orderedIds = { [ 'name2' ] } /> ) ;
2846
2846
cy . findByText ( 'Age' ) . click ( ) ;
2847
- cy . findByText ( 'Sort Ascending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2847
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Ascending' ) ;
2848
2848
cy . findByText ( 'Name' ) . click ( ) ;
2849
- cy . findByText ( 'Sort Ascending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2849
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Ascending' ) ;
2850
2850
2851
2851
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="0"]' ) . should ( 'have.text' , 'Kristen' ) ;
2852
2852
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="1"]' ) . should ( 'have.text' , '20' ) ;
2853
2853
cy . get ( '[data-visible-row-index="5"][data-visible-column-index="0"]' ) . should ( 'have.text' , 'Peter' ) ;
2854
2854
cy . get ( '[data-visible-row-index="5"][data-visible-column-index="1"]' ) . should ( 'have.text' , '40' ) ;
2855
2855
2856
2856
cy . findByText ( 'Age 2' ) . click ( ) ;
2857
- cy . findByText ( 'Sort Ascending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2857
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Ascending' ) ;
2858
2858
2859
2859
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="0"]' ) . should ( 'have.text' , 'Kristen' ) ;
2860
2860
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="1"]' ) . should ( 'have.text' , '20' ) ;
@@ -2864,7 +2864,7 @@ describe('AnalyticalTable', () => {
2864
2864
cy . get ( '[data-visible-row-index="5"][data-visible-column-index="3"]' ) . should ( 'have.text' , '18' ) ;
2865
2865
2866
2866
cy . findByText ( 'Name 2' ) . click ( ) ;
2867
- cy . findByText ( 'Sort Ascending ') . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
2867
+ cy . get ( '[ui5-list] ') . clickUi5ListItemByText ( 'Sort Ascending' ) ;
2868
2868
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="0"]' ) . should ( 'have.text' , 'Kristen' ) ;
2869
2869
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="1"]' ) . should ( 'have.text' , '20' ) ;
2870
2870
cy . get ( '[data-visible-row-index="1"][data-visible-column-index="2"]' ) . should ( 'have.text' , 'Alissa' ) ;
0 commit comments