@@ -334,9 +334,9 @@ describe('List', () => {
334
334
335
335
expect ( list . itemClicked . emit ) . toHaveBeenCalledTimes ( 2 ) ;
336
336
expect ( list . itemClicked . emit ) . toHaveBeenCalledWith ( args ) ;
337
-
337
+
338
338
list . headers [ 0 ] . element . dispatchEvent ( event ) ;
339
-
339
+
340
340
expect ( list . itemClicked . emit ) . toHaveBeenCalledTimes ( 3 ) ;
341
341
expect ( list . itemClicked . emit ) . toHaveBeenCalledWith ( args ) ;
342
342
} ) ;
@@ -359,25 +359,6 @@ describe('List', () => {
359
359
expect ( list . itemClicked . emit ) . toHaveBeenCalledOnceWith ( args ) ;
360
360
} ) ;
361
361
362
- // It should not emit itemClicked at all while panning. Only panning events should be emitted.
363
- // it('should emit ItemClicked with correct direction argument when panning left', () => {
364
- // const fixture = TestBed.createComponent(ListWithPanningTemplatesComponent);
365
- // const list = fixture.componentInstance.list;
366
-
367
- // spyOn(list.itemClicked, 'emit').and.callThrough();
368
-
369
- // fixture.detectChanges();
370
- // const itemNativeElements = fixture.debugElement.queryAll(By.css('igx-list-item'));
371
- // panItem(itemNativeElements[1], -0.8); // operating over the second list item because the first one is a header
372
-
373
- // const args: IListItemClickEventArgs = {
374
- // item: list.items[0],
375
- // event: null,
376
- // direction: IgxListPanState.LEFT
377
- // };
378
- // expect(list.itemClicked.emit).toHaveBeenCalledOnceWith(args);
379
- // });
380
-
381
362
it ( 'should emit ItemClicked with correct direction argument when swiping right' , ( ) => {
382
363
const fixture = TestBed . createComponent ( ListWithPanningTemplatesComponent ) ;
383
364
const list = fixture . componentInstance . list ;
@@ -396,22 +377,6 @@ describe('List', () => {
396
377
expect ( list . itemClicked . emit ) . toHaveBeenCalledOnceWith ( args ) ;
397
378
} ) ;
398
379
399
- // It should not emit itemClicked at all while panning. Only panning events should be emitted.
400
- // it('should emit ItemClicked with correct direction argument when panning right', (done) => {
401
- // const fixture = TestBed.createComponent(ListWithPanningTemplatesComponent);
402
- // const list = fixture.componentInstance.list;
403
-
404
- // list.itemClicked.subscribe((eventArgs) => {
405
- // expect(eventArgs.direction).toBe(IgxListPanState.RIGHT);
406
- // unsubscribeEvents(list);
407
- // done();
408
- // });
409
-
410
- // fixture.detectChanges();
411
- // const itemNativeElements = fixture.debugElement.queryAll(By.css('igx-list-item'));
412
- // panItem(itemNativeElements[1], 0.8); // operating over the second list item because the first one is a header
413
- // });
414
-
415
380
it ( 'should display multiple headers properly.' , ( ) => {
416
381
const fixture = TestBed . createComponent ( TwoHeadersListComponent ) ;
417
382
const list = fixture . componentInstance . list ;
@@ -485,7 +450,7 @@ describe('List', () => {
485
450
486
451
elementRefCollection = fixture . debugElement . queryAll ( By . css ( 'igx-list-item' ) ) ;
487
452
panItem ( elementRefCollection [ 1 ] , 0.8 ) ;
488
-
453
+
489
454
expect ( item . panState ) . toBe ( IgxListPanState . NONE ) ;
490
455
491
456
elementRefCollection = fixture . debugElement . queryAll ( By . css ( 'igx-list-item' ) ) ;
0 commit comments