@@ -2656,7 +2656,7 @@ describe('IgxGrid Component Tests', () => {
2656
2656
tick ( ) ;
2657
2657
fixture . detectChanges ( ) ;
2658
2658
expect ( trans . onStateUpdate . emit ) . not . toHaveBeenCalled ( ) ;
2659
- let state = trans . aggregatedState ( false ) ;
2659
+ let state = trans . getAggregatedChanges ( false ) ;
2660
2660
expect ( state . length ) . toEqual ( 0 ) ;
2661
2661
2662
2662
cell = grid . getCellByColumn ( 1 , 'ProductName' ) ;
@@ -2670,14 +2670,14 @@ describe('IgxGrid Component Tests', () => {
2670
2670
2671
2671
// Called once because row edit ended on row 1;
2672
2672
expect ( trans . onStateUpdate . emit ) . toHaveBeenCalledTimes ( 1 ) ;
2673
- state = trans . aggregatedState ( false ) ;
2673
+ state = trans . getAggregatedChanges ( false ) ;
2674
2674
expect ( state . length ) . toEqual ( 1 ) ;
2675
2675
expect ( state [ 0 ] . type ) . toEqual ( TransactionType . UPDATE ) ;
2676
2676
expect ( state [ 0 ] . newValue [ 'ProductName' ] ) . toEqual ( 'Chaiiii' ) ;
2677
2677
2678
2678
grid . endEdit ( true ) ;
2679
2679
tick ( ) ;
2680
- state = trans . aggregatedState ( false ) ;
2680
+ state = trans . getAggregatedChanges ( false ) ;
2681
2681
expect ( trans . onStateUpdate . emit ) . toHaveBeenCalled ( ) ;
2682
2682
expect ( state . length ) . toEqual ( 2 ) ;
2683
2683
expect ( state [ 0 ] . type ) . toEqual ( TransactionType . UPDATE ) ;
@@ -2688,7 +2688,7 @@ describe('IgxGrid Component Tests', () => {
2688
2688
tick ( ) ;
2689
2689
2690
2690
expect ( trans . onStateUpdate . emit ) . toHaveBeenCalled ( ) ;
2691
- state = trans . aggregatedState ( false ) ;
2691
+ state = trans . getAggregatedChanges ( false ) ;
2692
2692
expect ( state . length ) . toEqual ( 3 ) ;
2693
2693
expect ( state [ 2 ] . type ) . toEqual ( TransactionType . DELETE ) ;
2694
2694
expect ( state [ 2 ] . newValue ) . toBeNull ( ) ;
@@ -2697,7 +2697,7 @@ describe('IgxGrid Component Tests', () => {
2697
2697
tick ( ) ;
2698
2698
2699
2699
expect ( trans . onStateUpdate . emit ) . toHaveBeenCalled ( ) ;
2700
- state = trans . aggregatedState ( false ) ;
2700
+ state = trans . getAggregatedChanges ( false ) ;
2701
2701
expect ( state . length ) . toEqual ( 2 ) ;
2702
2702
expect ( state [ 1 ] . type ) . toEqual ( TransactionType . UPDATE ) ;
2703
2703
expect ( state [ 1 ] . newValue [ 'ProductName' ] ) . toEqual ( updateValue ) ;
@@ -2708,15 +2708,15 @@ describe('IgxGrid Component Tests', () => {
2708
2708
tick ( ) ;
2709
2709
2710
2710
expect ( trans . onStateUpdate . emit ) . toHaveBeenCalled ( ) ;
2711
- state = trans . aggregatedState ( false ) ;
2711
+ state = trans . getAggregatedChanges ( false ) ;
2712
2712
expect ( state . length ) . toEqual ( 3 ) ;
2713
2713
expect ( state [ 2 ] . type ) . toEqual ( TransactionType . DELETE ) ;
2714
2714
expect ( state [ 2 ] . newValue ) . toBeNull ( ) ;
2715
2715
expect ( row . classList ) . toContain ( 'igx-grid__tr--deleted' ) ;
2716
2716
2717
2717
trans . commit ( grid . data ) ;
2718
2718
tick ( ) ;
2719
- state = trans . aggregatedState ( false ) ;
2719
+ state = trans . getAggregatedChanges ( false ) ;
2720
2720
expect ( state . length ) . toEqual ( 0 ) ;
2721
2721
expect ( row . classList ) . not . toContain ( 'igx-grid__tr--deleted' ) ;
2722
2722
@@ -2729,7 +2729,7 @@ describe('IgxGrid Component Tests', () => {
2729
2729
tick ( ) ;
2730
2730
trans . clear ( ) ;
2731
2731
tick ( ) ;
2732
- state = trans . aggregatedState ( false ) ;
2732
+ state = trans . getAggregatedChanges ( false ) ;
2733
2733
expect ( state . length ) . toEqual ( 0 ) ;
2734
2734
expect ( cell . nativeElement . classList ) . not . toContain ( 'igx-grid__tr--edited' ) ;
2735
2735
} ) ) ;
@@ -2787,15 +2787,15 @@ describe('IgxGrid Component Tests', () => {
2787
2787
2788
2788
const grid = fixture . componentInstance . grid ;
2789
2789
const cell = grid . getCellByColumn ( 0 , 'ProductName' ) ;
2790
- const initialState = grid . transactions . aggregatedState ( false ) ;
2790
+ const initialState = grid . transactions . getAggregatedChanges ( false ) ;
2791
2791
expect ( cell . value ) . toBe ( 'Chai' ) ;
2792
2792
2793
2793
// Set to same value
2794
2794
cell . update ( 'Chai' ) ;
2795
2795
tick ( ) ;
2796
2796
fixture . detectChanges ( ) ;
2797
2797
expect ( cell . value ) . toBe ( 'Chai' ) ;
2798
- expect ( grid . transactions . aggregatedState ( false ) ) . toEqual ( initialState ) ;
2798
+ expect ( grid . transactions . getAggregatedChanges ( false ) ) . toEqual ( initialState ) ;
2799
2799
2800
2800
// Change value and check if it's logged
2801
2801
cell . update ( 'Updated value' ) ;
@@ -2807,7 +2807,7 @@ describe('IgxGrid Component Tests', () => {
2807
2807
newValue : { ProductName : 'Updated value' } ,
2808
2808
type : TransactionType . UPDATE
2809
2809
} ;
2810
- expect ( grid . transactions . aggregatedState ( false ) ) . toEqual ( [ expectedTransaction ] ) ;
2810
+ expect ( grid . transactions . getAggregatedChanges ( false ) ) . toEqual ( [ expectedTransaction ] ) ;
2811
2811
} ) ) ;
2812
2812
2813
2813
it ( `Should not log a transaction when a cell's value does not change - Date` , fakeAsync ( ( ) => {
@@ -2818,7 +2818,7 @@ describe('IgxGrid Component Tests', () => {
2818
2818
const cellStock = grid . getCellByColumn ( 0 , 'UnitsInStock' ) ;
2819
2819
const cellDate = grid . getCellByColumn ( 0 , 'OrderDate' ) ;
2820
2820
const initialCellValue = cellDate . value ;
2821
- const initialState = grid . transactions . aggregatedState ( false ) ;
2821
+ const initialState = grid . transactions . getAggregatedChanges ( false ) ;
2822
2822
2823
2823
// Enter edit mode
2824
2824
cellDate . onKeydownEnterEditMode ( { stopPropagation : ( ) => { } , preventDefault : ( ) => { } } ) ;
@@ -2832,7 +2832,7 @@ describe('IgxGrid Component Tests', () => {
2832
2832
grid . endEdit ( true ) ;
2833
2833
tick ( ) ;
2834
2834
fixture . detectChanges ( ) ;
2835
- expect ( grid . transactions . aggregatedState ( true ) ) . toEqual ( initialState ) ;
2835
+ expect ( grid . transactions . getAggregatedChanges ( true ) ) . toEqual ( initialState ) ;
2836
2836
2837
2837
const newValue = new Date ( '01/01/2000' ) ;
2838
2838
cellDate . update ( newValue ) ;
@@ -2843,7 +2843,7 @@ describe('IgxGrid Component Tests', () => {
2843
2843
newValue : { OrderDate : newValue } ,
2844
2844
type : TransactionType . UPDATE
2845
2845
} ;
2846
- expect ( grid . transactions . aggregatedState ( false ) ) . toEqual ( [ expectedTransaction ] ) ;
2846
+ expect ( grid . transactions . getAggregatedChanges ( false ) ) . toEqual ( [ expectedTransaction ] ) ;
2847
2847
} ) ) ;
2848
2848
2849
2849
it ( 'Should allow to change of a cell in added row in grid with transactions' , fakeAsync ( ( ) => {
0 commit comments