@@ -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 { IGridEditEventArgs , IGridEditDoneEventArgs } from '../common/events' ;
6+ import { IGridEditDoneEventArgs , IGridEditEventArgs , IRowDataEventArgs } from '../common/events' ;
77import { IgxColumnComponent } from '../columns/column.component' ;
88import { DisplayDensity } from '../../core/density' ;
99import { UIInteractions , wait } from '../../test-utils/ui-interactions.spec' ;
@@ -292,8 +292,9 @@ describe('IgxGrid - Row Editing #grid', () => {
292292 expect ( grid . rowEditDone . emit ) . toHaveBeenCalledWith ( rowDoneArgs ) ;
293293 } ) ;
294294
295- it ( 'Emit rowAdd event with proper arguments' , ( ) => {
295+ it ( 'Emit rowAdd and rowAdded event with proper arguments' , ( ) => {
296296 spyOn ( grid . rowAdd , 'emit' ) . and . callThrough ( ) ;
297+ spyOn ( grid . rowAdded , 'emit' ) . and . callThrough ( ) ;
297298 // start add row
298299 grid . beginAddRowById ( null ) ;
299300 fix . detectChanges ( ) ;
@@ -328,7 +329,14 @@ describe('IgxGrid - Row Editing #grid', () => {
328329 owner : grid ,
329330 isAddRow : true
330331 }
332+
333+ const rowAddedArgs : IRowDataEventArgs = {
334+ data : { ProductID : generatedId , ProductName : "NewValue" } ,
335+ primaryKey : generatedId ,
336+ owner : grid
337+ } ;
331338 expect ( grid . rowAdd . emit ) . toHaveBeenCalledWith ( rowAddArgs ) ;
339+ expect ( grid . rowAdded . emit ) . toHaveBeenCalledWith ( rowAddedArgs ) ;
332340 } ) ;
333341
334342 it ( 'Should display the banner below the edited row if it is not the last one' , ( ) => {
0 commit comments