@@ -23,7 +23,6 @@ import { Size } from '../common/enums';
23
23
import { setElementSize } from '../../test-utils/helper-utils.spec' ;
24
24
import { IgxPivotRowDimensionMrlRowComponent } from './pivot-row-dimension-mrl-row.component' ;
25
25
import { IgxPivotRowDimensionContentComponent } from './pivot-row-dimension-content.component' ;
26
- import { flatten } from '../../core/utils' ;
27
26
28
27
const CSS_CLASS_LIST = 'igx-drop-down__list' ;
29
28
const CSS_CLASS_ITEM = 'igx-drop-down__item' ;
@@ -3107,7 +3106,7 @@ describe('IgxPivotGrid #pivotGrid', () => {
3107
3106
] ;
3108
3107
pivotGrid . pipeTrigger ++ ;
3109
3108
fixture . detectChanges ( ) ;
3110
- const rowHeaders = fixture . debugElement . queryAll (
3109
+ let rowHeaders = fixture . debugElement . queryAll (
3111
3110
By . directive ( IgxPivotRowDimensionHeaderComponent ) ) ;
3112
3111
3113
3112
const productsHeaderColumn = rowHeaders . filter ( x => x . componentInstance . column . header === "ProductCategory" ) [ 0 ] . nativeElement ;
@@ -3119,8 +3118,14 @@ describe('IgxPivotGrid #pivotGrid', () => {
3119
3118
const sortIcon = productsHeaderColumn . querySelectorAll ( 'igx-icon' ) [ 0 ] ;
3120
3119
sortIcon . click ( ) ;
3121
3120
fixture . detectChanges ( ) ;
3121
+ sortIcon . click ( ) ;
3122
+ fixture . detectChanges ( ) ;
3122
3123
3123
- expect ( productRowContentsHeaders ) . toEqual ( [ 'ProductCategory' , 'Components' , 'Clothing' , 'Bikes' , 'Accessories' ] ) ;
3124
+ rowHeaders = fixture . debugElement . queryAll (
3125
+ By . directive ( IgxPivotRowDimensionHeaderComponent ) ) ;
3126
+ const updatedProductRowContents = rowHeaders . filter ( x => x . componentInstance . column . field === "ProductCategory" ) ;
3127
+ const updatedProductRowContentsHeaders = updatedProductRowContents . map ( x => x . componentInstance . column . header ) ;
3128
+ expect ( updatedProductRowContentsHeaders ) . toEqual ( [ 'ProductCategory' , 'Components' , 'Clothing' , 'Bikes' , 'Accessories' ] ) ;
3124
3129
} ) ;
3125
3130
3126
3131
it ( "should allow select/deselect the correct rows on row header click." , ( ) => {
0 commit comments