@@ -1106,22 +1106,28 @@ describe('AnalyticalTable', () => {
1106
1106
const alternatingRowColor = cssVarToRgb ( ThemingParameters . sapList_AlternatingBackground ) ;
1107
1107
cy . mount ( < AnalyticalTable data = { data } columns = { columns } alternateRowColor minRows = { 7 } /> ) ;
1108
1108
cy . get ( '[data-component-name="AnalyticalTableContainer"]' ) . should ( 'have.css' , 'background-color' , standardRowColor ) ;
1109
- for ( let i = 1 ; i <= 4 ; i ++ ) {
1110
- if ( i % 2 ) {
1111
- // no color set
1112
- cy . get ( `[aria-rowindex="${ i } "]` ) . should ( 'have.css' , 'background-color' , 'rgba(0, 0, 0, 0)' ) ;
1113
- } else {
1114
- cy . get ( `[aria-rowindex="${ i } "]` ) . should ( 'have.css' , 'background-color' , alternatingRowColor ) ;
1109
+ function testAlternateRowColor ( ) {
1110
+ for ( let i = 1 ; i <= 4 ; i ++ ) {
1111
+ if ( i % 2 ) {
1112
+ // no color set
1113
+ cy . get ( `[aria-rowindex="${ i } "]` ) . should ( 'have.css' , 'background-color' , 'rgba(0, 0, 0, 0)' ) ;
1114
+ } else {
1115
+ cy . get ( `[aria-rowindex="${ i } "]` ) . should ( 'have.css' , 'background-color' , alternatingRowColor ) ;
1116
+ }
1115
1117
}
1118
+ cy . get ( '[data-empty-row="true"]' ) . each ( ( $emptyRow , i ) => {
1119
+ if ( ( i + 1 ) % 2 ) {
1120
+ // no color set
1121
+ cy . wrap ( $emptyRow ) . should ( 'have.css' , 'background-color' , 'rgba(0, 0, 0, 0)' ) ;
1122
+ } else {
1123
+ cy . wrap ( $emptyRow ) . should ( 'have.css' , 'background-color' , alternatingRowColor ) ;
1124
+ }
1125
+ } ) ;
1116
1126
}
1117
- cy . get ( '[data-empty-row="true"]' ) . each ( ( $emptyRow , i ) => {
1118
- if ( ( i + 1 ) % 2 ) {
1119
- // no color set
1120
- cy . wrap ( $emptyRow ) . should ( 'have.css' , 'background-color' , 'rgba(0, 0, 0, 0)' ) ;
1121
- } else {
1122
- cy . wrap ( $emptyRow ) . should ( 'have.css' , 'background-color' , alternatingRowColor ) ;
1123
- }
1124
- } ) ;
1127
+ testAlternateRowColor ( ) ;
1128
+ cy . findByText ( 'Name' ) . click ( ) ;
1129
+ cy . findByText ( 'Sort Ascending' ) . shadow ( ) . findByRole ( 'listitem' ) . click ( { force : true } ) ;
1130
+ testAlternateRowColor ( ) ;
1125
1131
} ) ;
1126
1132
1127
1133
it ( 'initial column order' , ( ) => {
0 commit comments