@@ -3,7 +3,7 @@ import { TestBed, fakeAsync, tick, waitForAsync } from '@angular/core/testing';
33import { By } from '@angular/platform-browser' ;
44import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
55import { IgxGridComponent } from './grid.component' ;
6- import { IGridEditDoneEventArgs , IGridEditEventArgs , IRowDataCancelableEventArgs } from '../common/events' ;
6+ import { IGridEditDoneEventArgs , IGridEditEventArgs , IRowDataCancelableEventArgs , IRowDataEventArgs } from '../common/events' ;
77import { IgxColumnComponent } from '../columns/column.component' ;
88import { DisplayDensity } from '../../core/density' ;
99import { UIInteractions , wait } from '../../test-utils/ui-interactions.spec' ;
@@ -299,8 +299,9 @@ describe('IgxGrid - Row Editing #grid', () => {
299299 expect ( grid . rowEditDone . emit ) . toHaveBeenCalledWith ( rowDoneArgs ) ;
300300 } ) ;
301301
302- it ( 'Emit rowAdd event with proper arguments' , ( ) => {
302+ it ( 'Emit rowAdd and rowAdded event with proper arguments' , ( ) => {
303303 spyOn ( grid . rowAdd , 'emit' ) . and . callThrough ( ) ;
304+ spyOn ( grid . rowAdded , 'emit' ) . and . callThrough ( ) ;
304305 // start add row
305306 grid . beginAddRowById ( null ) ;
306307 fix . detectChanges ( ) ;
@@ -336,7 +337,16 @@ describe('IgxGrid - Row Editing #grid', () => {
336337 owner : grid ,
337338 isAddRow : true
338339 }
340+
341+ const rowAddedArgs : IRowDataEventArgs = {
342+ rowData : { ProductID : generatedId , ProductName : "NewValue" } ,
343+ data : { ProductID : generatedId , ProductName : "NewValue" } ,
344+ primaryKey : generatedId ,
345+ rowKey : generatedId ,
346+ owner : grid
347+ } ;
339348 expect ( grid . rowAdd . emit ) . toHaveBeenCalledWith ( rowAddArgs ) ;
349+ expect ( grid . rowAdded . emit ) . toHaveBeenCalledWith ( rowAddedArgs ) ;
340350 } ) ;
341351
342352 it ( 'Should display the banner below the edited row if it is not the last one' , ( ) => {
0 commit comments