@@ -23,6 +23,7 @@ import { setElementSize } from '../../test-utils/helper-utils.spec';
2323import { IgxPivotRowDimensionMrlRowComponent } from './pivot-row-dimension-mrl-row.component' ;
2424import { IgxPivotRowDimensionContentComponent } from './pivot-row-dimension-content.component' ;
2525import { IgxGridCellComponent } from '../cell.component' ;
26+ import { getI18nManager } from 'igniteui-i18n-core' ;
2627
2728const CSS_CLASS_LIST = 'igx-drop-down__list' ;
2829const CSS_CLASS_ITEM = 'igx-drop-down__item' ;
@@ -45,8 +46,10 @@ describe('IgxPivotGrid #pivotGrid', () => {
4546 let fixture : ComponentFixture < IgxPivotGridTestBaseComponent > ;
4647
4748 beforeEach ( waitForAsync ( ( ) => {
49+ getI18nManager ( ) . toggleEvents ( false ) ;
4850 fixture = TestBed . createComponent ( IgxPivotGridTestBaseComponent ) ;
4951 fixture . detectChanges ( ) ;
52+ getI18nManager ( ) . toggleEvents ( true ) ;
5053 } ) ) ;
5154
5255 it ( 'should show empty template when there are no dimensions and values' , ( ) => {
@@ -316,9 +319,10 @@ describe('IgxPivotGrid #pivotGrid', () => {
316319 {
317320 memberName : 'Date' ,
318321 enabled : true
319- } , {
320- total : false
321- }
322+ } ,
323+ {
324+ total : false
325+ }
322326 ) ;
323327 pivotGrid . notifyDimensionChange ( true ) ;
324328 expect ( pivotGrid . columns . length ) . toBe ( 5 ) ;
@@ -760,7 +764,7 @@ describe('IgxPivotGrid #pivotGrid', () => {
760764 expect ( pivotGrid . columns . length ) . toBe ( 3 ) ;
761765 } ) ;
762766
763- it ( 'should calculate row headers according to grid size' , async ( ) => {
767+ it ( 'should calculate row headers according to grid size' , async ( ) => {
764768 const pivotGrid = fixture . componentInstance . pivotGrid ;
765769 const rowHeightSmall = 32 ;
766770 const rowHeightMedium = 40 ;
@@ -797,7 +801,7 @@ describe('IgxPivotGrid #pivotGrid', () => {
797801 expect ( rowHeader [ 0 ] . nativeElement . offsetHeight ) . toBe ( rowHeightMedium ) ;
798802 } ) ;
799803
800- it ( 'should render with correct width when set to 100% inside of flex container' , async ( ) => {
804+ it ( 'should render with correct width when set to 100% inside of flex container' , async ( ) => {
801805 fixture = TestBed . createComponent ( IgxPivotGridFlexContainerComponent ) ;
802806 fixture . detectChanges ( ) ;
803807 await wait ( 100 ) ;
@@ -2119,7 +2123,7 @@ describe('IgxPivotGrid #pivotGrid', () => {
21192123 cell . nativeElement . click ( ) ;
21202124 const cellClickargs : IGridCellEventArgs = { cell, event : new MouseEvent ( 'click' ) } ;
21212125
2122- const gridCell = cellClickargs . cell as IgxGridCellComponent ;
2126+ const gridCell = cellClickargs . cell as IgxGridCellComponent ;
21232127 const firstEntry = gridCell . rowData . aggregationValues . entries ( ) . next ( ) . value ;
21242128 expect ( firstEntry ) . toEqual ( [ 'USA-UnitsSold' , 829 ] ) ;
21252129 } ) ;
@@ -2233,38 +2237,38 @@ describe('IgxPivotGrid #pivotGrid', () => {
22332237 columns : fixture . componentInstance . pivotConfigHierarchy . columns ,
22342238 rows : fixture . componentInstance . pivotConfigHierarchy . rows ,
22352239 values : [
2236- {
2237- member : 'UnitsSold' ,
2238- aggregate : {
2239- aggregator : IgxPivotNumericAggregate . sum ,
2240- key : 'SUM' ,
2241- label : 'Sum'
2242- } ,
2243- enabled : true ,
2244- formatter : ( value , row , column ) => {
2245- if ( ! column || ! column . value || column . value . member !== 'UnitsSold' ) {
2246- correctFirstColumnData = false ;
2240+ {
2241+ member : 'UnitsSold' ,
2242+ aggregate : {
2243+ aggregator : IgxPivotNumericAggregate . sum ,
2244+ key : 'SUM' ,
2245+ label : 'Sum'
2246+ } ,
2247+ enabled : true ,
2248+ formatter : ( value , row , column ) => {
2249+ if ( ! column || ! column . value || column . value . member !== 'UnitsSold' ) {
2250+ correctFirstColumnData = false ;
2251+ }
2252+ return value ;
22472253 }
2248- return value ;
2249- }
2250- } ,
2251- {
2252- member : 'AmountOfSale' ,
2253- displayName : 'Amount of Sale' ,
2254- aggregate : {
2255- aggregator : IgxTotalSaleAggregate . totalSale ,
2256- key : 'TOTAL' ,
2257- label : 'Total'
22582254 } ,
2259- enabled : true ,
2260- formatter : ( value , row , column ) => {
2261- if ( ! column || ! column . value || column . value . member !== 'AmountOfSale' ) {
2262- correctSecondColumnData = false ;
2255+ {
2256+ member : 'AmountOfSale' ,
2257+ displayName : 'Amount of Sale' ,
2258+ aggregate : {
2259+ aggregator : IgxTotalSaleAggregate . totalSale ,
2260+ key : 'TOTAL' ,
2261+ label : 'Total'
2262+ } ,
2263+ enabled : true ,
2264+ formatter : ( value , row , column ) => {
2265+ if ( ! column || ! column . value || column . value . member !== 'AmountOfSale' ) {
2266+ correctSecondColumnData = false ;
2267+ }
2268+ return value ;
22632269 }
2264- return value ;
22652270 }
2266- }
2267- ]
2271+ ]
22682272 } ;
22692273
22702274 pivotGrid . width = '1500px' ;
0 commit comments