@@ -79,7 +79,7 @@ describe('Basic IgxPivotGrid #pivotGrid', () => {
79
79
checkboxes [ 1 ] . click ( ) ;
80
80
fixture . detectChanges ( ) ;
81
81
82
- // uncheck Bikes
82
+ // uncheck Bikes
83
83
checkboxes [ 2 ] . click ( ) ;
84
84
fixture . detectChanges ( ) ;
85
85
@@ -109,19 +109,19 @@ describe('Basic IgxPivotGrid #pivotGrid', () => {
109
109
checkboxes [ 1 ] . click ( ) ;
110
110
fixture . detectChanges ( ) ;
111
111
112
- // uncheck Uruguay
112
+ // uncheck Uruguay
113
113
checkboxes [ 2 ] . click ( ) ;
114
114
fixture . detectChanges ( ) ;
115
115
116
116
117
- // Click 'apply' button to apply filter.
118
- GridFunctions . clickApplyExcelStyleFiltering ( fixture , excelMenu , 'igx-pivot-grid' ) ;
119
- fixture . detectChanges ( ) ;
117
+ // Click 'apply' button to apply filter.
118
+ GridFunctions . clickApplyExcelStyleFiltering ( fixture , excelMenu , 'igx-pivot-grid' ) ;
119
+ fixture . detectChanges ( ) ;
120
120
121
- // check columns
122
- const colHeaders = pivotGrid . columns . filter ( x => x . level === 0 ) . map ( x => x . header ) ;
123
- const expected = [ 'USA' ] ;
124
- expect ( colHeaders ) . toEqual ( expected ) ;
121
+ // check columns
122
+ const colHeaders = pivotGrid . columns . filter ( x => x . level === 0 ) . map ( x => x . header ) ;
123
+ const expected = [ 'USA' ] ;
124
+ expect ( colHeaders ) . toEqual ( expected ) ;
125
125
} ) ;
126
126
127
127
it ( 'should apply sorting for dimension via row chip' , ( ) => {
@@ -207,14 +207,14 @@ describe('Basic IgxPivotGrid #pivotGrid', () => {
207
207
aggregator : IgxTotalSaleAggregate . totalSale ,
208
208
label : 'Sum of Sale'
209
209
} , {
210
- key : 'MIN' ,
211
- aggregator : IgxTotalSaleAggregate . totalMin ,
212
- label : 'Minimum of Sale'
213
- } , {
214
- key : 'MAX' ,
215
- aggregator : IgxTotalSaleAggregate . totalMax ,
216
- label : 'Maximum of Sale'
217
- } ] ,
210
+ key : 'MIN' ,
211
+ aggregator : IgxTotalSaleAggregate . totalMin ,
212
+ label : 'Minimum of Sale'
213
+ } , {
214
+ key : 'MAX' ,
215
+ aggregator : IgxTotalSaleAggregate . totalMax ,
216
+ label : 'Maximum of Sale'
217
+ } ] ,
218
218
enabled : true
219
219
} ) ;
220
220
pivotGrid . pipeTrigger ++ ;
@@ -274,8 +274,10 @@ describe('IgxPivotGrid complex hierarchy #pivotGrid', () => {
274
274
const expected =
275
275
{
276
276
'All cities' : 'All Cities' , 'All cities_level' : 0 ,
277
- ProductCategory : 'Bikes' , ProductCategory_level : 1 ,
278
- 'Uruguay-AmountOfSale' : 242.08 , 'Uruguay-UnitsSold' : 68
277
+ ProductCategory : 'Clothing' , ProductCategory_level : 1 ,
278
+ 'Bulgaria-AmountOfSale' : 3612.42 , 'Bulgaria-UnitsSold' : 282 ,
279
+ 'US-AmountOfSale' : 14672.72 , 'US-UnitsSold' : 296 ,
280
+ 'Uruguay-AmountOfSale' : 31158.48 , 'Uruguay-UnitsSold' : 456
279
281
} ;
280
282
expect ( pivotGrid . selectedRows [ 0 ] ) . toEqual ( expected ) ;
281
283
@@ -303,25 +305,28 @@ describe('IgxPivotGrid complex hierarchy #pivotGrid', () => {
303
305
{
304
306
AllProducts : 'AllProducts' , 'All cities' : 'All Cities' ,
305
307
'All cities_level' : 0 , AllProducts_level : 0 , 'Bulgaria-UnitsSold' : 774 ,
306
- 'Bulgaria-AmountOfSale' : 11509.02 , 'USA-UnitsSold' : 829 , 'USA-AmountOfSale' : 44098.85999999999 ,
307
- 'Uruguay-UnitsSold' : 524 , 'Uruguay-AmountOfSale' : 31400.56
308
- } , {
309
- ProductCategory : 'Clothing' , 'All cities' : 'All Cities' ,
310
- ProductCategory_level : 1 , 'All cities_level' : 0 , 'Bulgaria-UnitsSold' : 774 ,
311
- 'Bulgaria-AmountOfSale' : 11509.02 , 'USA-UnitsSold' : 296 , 'USA-AmountOfSale' : 14672.72 ,
312
- 'Uruguay-UnitsSold' : 456 , 'Uruguay-AmountOfSale' : 31158.48
308
+ 'Bulgaria-AmountOfSale' : 11509.02 , 'US-UnitsSold' : 296 , 'US-AmountOfSale' : 14672.72 ,
309
+ 'Uruguay-UnitsSold' : 524 , 'Uruguay-AmountOfSale' : 31400.56 ,
310
+ 'UK-UnitsSold' : 293 , 'UK-AmountOfSale' : 25074.94 ,
311
+ 'Japan-UnitsSold' : 240 , 'Japan-AmountOfSale' : 4351.2 ,
313
312
} , {
314
313
ProductCategory : 'Bikes' , 'All cities' : 'All Cities' ,
315
314
ProductCategory_level : 1 , 'All cities_level' : 0 ,
316
315
'Uruguay-UnitsSold' : 68 , 'Uruguay-AmountOfSale' : 242.08
316
+ } , {
317
+ ProductCategory : 'Clothing' , 'All cities' : 'All Cities' ,
318
+ ProductCategory_level : 1 , 'All cities_level' : 0 , 'Bulgaria-UnitsSold' : 282 ,
319
+ 'Bulgaria-AmountOfSale' : 3612.42 , 'US-UnitsSold' : 296 , 'US-AmountOfSale' : 14672.72 ,
320
+ 'Uruguay-UnitsSold' : 456 , 'Uruguay-AmountOfSale' : 31158.48
317
321
} , {
318
322
ProductCategory : 'Accessories' , 'All cities' : 'All Cities' ,
319
323
ProductCategory_level : 1 , 'All cities_level' : 0 ,
320
- 'USA -UnitsSold' : 293 , 'USA -AmountOfSale' : 25074.94
324
+ 'UK -UnitsSold' : 293 , 'UK -AmountOfSale' : 25074.94
321
325
} , {
322
326
ProductCategory : 'Components' , 'All cities' : 'All Cities' ,
323
327
ProductCategory_level : 1 , 'All cities_level' : 0 ,
324
- 'USA-UnitsSold' : 240 , 'USA-AmountOfSale' : 4351.2
328
+ 'Japan-UnitsSold' : 240 , 'Japan-AmountOfSale' : 4351.2 ,
329
+ 'Bulgaria-UnitsSold' : 492 , 'Bulgaria-AmountOfSale' : 7896.6
325
330
}
326
331
] ;
327
332
expect ( pivotGrid . selectedRows ) . toEqual ( expected ) ;
0 commit comments