@@ -344,7 +344,10 @@ describe('CdkDrag', () => {
344
344
345
345
// Assert the event like this, rather than `toHaveBeenCalledWith`, because Jasmine will
346
346
// go into an infinite loop trying to stringify the event, if the test fails.
347
- expect ( event ) . toEqual ( { source : fixture . componentInstance . dragInstance } ) ;
347
+ expect ( event ) . toEqual ( {
348
+ source : fixture . componentInstance . dragInstance ,
349
+ event : jasmine . anything ( )
350
+ } ) ;
348
351
} ) ) ;
349
352
350
353
it ( 'should dispatch an event when the user has stopped dragging' , fakeAsync ( ( ) => {
@@ -361,7 +364,8 @@ describe('CdkDrag', () => {
361
364
// go into an infinite loop trying to stringify the event, if the test fails.
362
365
expect ( event ) . toEqual ( {
363
366
source : fixture . componentInstance . dragInstance ,
364
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
367
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
368
+ event : jasmine . anything ( )
365
369
} ) ;
366
370
} ) ) ;
367
371
@@ -374,15 +378,17 @@ describe('CdkDrag', () => {
374
378
375
379
expect ( event ) . toEqual ( {
376
380
source : jasmine . anything ( ) ,
377
- distance : { x : 25 , y : 30 }
381
+ distance : { x : 25 , y : 30 } ,
382
+ event : jasmine . anything ( )
378
383
} ) ;
379
384
380
385
dragElementViaMouse ( fixture , fixture . componentInstance . dragElement . nativeElement , 40 , 50 ) ;
381
386
event = fixture . componentInstance . endedSpy . calls . mostRecent ( ) . args [ 0 ] ;
382
387
383
388
expect ( event ) . toEqual ( {
384
389
source : jasmine . anything ( ) ,
385
- distance : { x : 40 , y : 50 }
390
+ distance : { x : 40 , y : 50 } ,
391
+ event : jasmine . anything ( )
386
392
} ) ;
387
393
} ) ) ;
388
394
@@ -1382,7 +1388,8 @@ describe('CdkDrag', () => {
1382
1388
container : fixture . componentInstance . dropInstance ,
1383
1389
previousContainer : fixture . componentInstance . dropInstance ,
1384
1390
isPointerOverContainer : true ,
1385
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
1391
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
1392
+ event : jasmine . anything ( )
1386
1393
} ) ;
1387
1394
1388
1395
expect ( dragItems . map ( drag => drag . element . nativeElement . textContent ! . trim ( ) ) )
@@ -1508,7 +1515,8 @@ describe('CdkDrag', () => {
1508
1515
container : fixture . componentInstance . dropInstance ,
1509
1516
previousContainer : fixture . componentInstance . dropInstance ,
1510
1517
isPointerOverContainer : false ,
1511
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
1518
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
1519
+ event : jasmine . anything ( )
1512
1520
} ) ;
1513
1521
1514
1522
expect ( dragItems . map ( drag => drag . element . nativeElement . textContent ! . trim ( ) ) )
@@ -1567,7 +1575,8 @@ describe('CdkDrag', () => {
1567
1575
container : fixture . componentInstance . dropInstance ,
1568
1576
previousContainer : fixture . componentInstance . dropInstance ,
1569
1577
isPointerOverContainer : true ,
1570
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
1578
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
1579
+ event : jasmine . anything ( )
1571
1580
} ) ;
1572
1581
1573
1582
expect ( dragItems . map ( drag => drag . element . nativeElement . textContent ! . trim ( ) ) )
@@ -1608,7 +1617,8 @@ describe('CdkDrag', () => {
1608
1617
container : fixture . componentInstance . dropInstance ,
1609
1618
previousContainer : fixture . componentInstance . dropInstance ,
1610
1619
isPointerOverContainer : true ,
1611
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
1620
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
1621
+ event : jasmine . anything ( )
1612
1622
} ) ;
1613
1623
1614
1624
expect ( dragItems . map ( drag => drag . element . nativeElement . textContent ! . trim ( ) ) )
@@ -1645,7 +1655,8 @@ describe('CdkDrag', () => {
1645
1655
container : fixture . componentInstance . dropInstance ,
1646
1656
previousContainer : fixture . componentInstance . dropInstance ,
1647
1657
isPointerOverContainer : false ,
1648
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
1658
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
1659
+ event : jasmine . anything ( )
1649
1660
} ) ;
1650
1661
1651
1662
expect ( dragItems . map ( drag => drag . element . nativeElement . textContent ! . trim ( ) ) )
@@ -1688,7 +1699,8 @@ describe('CdkDrag', () => {
1688
1699
container : fixture . componentInstance . dropInstance ,
1689
1700
previousContainer : fixture . componentInstance . dropInstance ,
1690
1701
isPointerOverContainer : jasmine . any ( Boolean ) ,
1691
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
1702
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
1703
+ event : jasmine . anything ( )
1692
1704
} ) ;
1693
1705
} ) ) ;
1694
1706
@@ -1736,7 +1748,8 @@ describe('CdkDrag', () => {
1736
1748
container : fixture . componentInstance . dropInstance ,
1737
1749
previousContainer : fixture . componentInstance . dropInstance ,
1738
1750
isPointerOverContainer : jasmine . any ( Boolean ) ,
1739
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
1751
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
1752
+ event : jasmine . anything ( )
1740
1753
} ) ;
1741
1754
1742
1755
scrollTo ( 0 , 0 ) ;
@@ -2930,7 +2943,8 @@ describe('CdkDrag', () => {
2930
2943
container : dropInstance ,
2931
2944
previousContainer : dropInstance ,
2932
2945
isPointerOverContainer : true ,
2933
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
2946
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
2947
+ event : jasmine . anything ( )
2934
2948
} ) ;
2935
2949
2936
2950
expect ( dragItems . map ( drag => drag . element . nativeElement . textContent ! . trim ( ) ) )
@@ -3309,7 +3323,8 @@ describe('CdkDrag', () => {
3309
3323
container : fixture . componentInstance . dropInstances . toArray ( ) [ 1 ] ,
3310
3324
previousContainer : fixture . componentInstance . dropInstances . first ,
3311
3325
isPointerOverContainer : true ,
3312
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3326
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3327
+ event : jasmine . anything ( )
3313
3328
} ) ;
3314
3329
} ) ) ;
3315
3330
@@ -3412,7 +3427,8 @@ describe('CdkDrag', () => {
3412
3427
container : dropInstances [ 1 ] ,
3413
3428
previousContainer : dropInstances [ 0 ] ,
3414
3429
isPointerOverContainer : true ,
3415
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3430
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3431
+ event : jasmine . anything ( )
3416
3432
} ) ;
3417
3433
} ) ) ;
3418
3434
@@ -3443,7 +3459,8 @@ describe('CdkDrag', () => {
3443
3459
container : dropInstances [ 0 ] ,
3444
3460
previousContainer : dropInstances [ 0 ] ,
3445
3461
isPointerOverContainer : false ,
3446
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3462
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3463
+ event : jasmine . anything ( )
3447
3464
} ) ;
3448
3465
} ) ) ;
3449
3466
@@ -3474,7 +3491,8 @@ describe('CdkDrag', () => {
3474
3491
container : dropInstances [ 0 ] ,
3475
3492
previousContainer : dropInstances [ 0 ] ,
3476
3493
isPointerOverContainer : false ,
3477
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3494
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3495
+ event : jasmine . anything ( )
3478
3496
} ) ;
3479
3497
} ) ) ;
3480
3498
@@ -3598,7 +3616,8 @@ describe('CdkDrag', () => {
3598
3616
container : dropInstances [ 1 ] ,
3599
3617
previousContainer : dropInstances [ 0 ] ,
3600
3618
isPointerOverContainer : true ,
3601
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3619
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3620
+ event : jasmine . anything ( )
3602
3621
} ) ;
3603
3622
} ) ) ;
3604
3623
@@ -3625,7 +3644,8 @@ describe('CdkDrag', () => {
3625
3644
container : dropInstances [ 1 ] ,
3626
3645
previousContainer : dropInstances [ 0 ] ,
3627
3646
isPointerOverContainer : true ,
3628
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3647
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3648
+ event : jasmine . anything ( )
3629
3649
} ) ;
3630
3650
} ) ) ;
3631
3651
@@ -3657,7 +3677,8 @@ describe('CdkDrag', () => {
3657
3677
container : dropInstances [ 1 ] ,
3658
3678
previousContainer : dropInstances [ 0 ] ,
3659
3679
isPointerOverContainer : true ,
3660
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3680
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3681
+ event : jasmine . anything ( )
3661
3682
} ) ;
3662
3683
} ) ) ;
3663
3684
@@ -3693,7 +3714,8 @@ describe('CdkDrag', () => {
3693
3714
container : fixture . componentInstance . dropInstances . toArray ( ) [ 1 ] ,
3694
3715
previousContainer : fixture . componentInstance . dropInstances . first ,
3695
3716
isPointerOverContainer : true ,
3696
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3717
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3718
+ event : jasmine . anything ( )
3697
3719
} ) ;
3698
3720
3699
3721
expect ( dropContainers [ 0 ] . contains ( item . element . nativeElement ) ) . toBe ( true ,
@@ -3790,7 +3812,8 @@ describe('CdkDrag', () => {
3790
3812
container : dropInstances [ 0 ] ,
3791
3813
previousContainer : dropInstances [ 0 ] ,
3792
3814
isPointerOverContainer : false ,
3793
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3815
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3816
+ event : jasmine . anything ( )
3794
3817
} ) ;
3795
3818
} ) ) ;
3796
3819
@@ -3911,7 +3934,8 @@ describe('CdkDrag', () => {
3911
3934
container : dropInstances [ 2 ] ,
3912
3935
previousContainer : dropInstances [ 0 ] ,
3913
3936
isPointerOverContainer : false ,
3914
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3937
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3938
+ event : jasmine . anything ( )
3915
3939
} ) ) ;
3916
3940
3917
3941
} ) ) ;
@@ -4128,7 +4152,8 @@ describe('CdkDrag', () => {
4128
4152
container : fixture . componentInstance . dropInstances . toArray ( ) [ 1 ] ,
4129
4153
previousContainer : fixture . componentInstance . dropInstances . first ,
4130
4154
isPointerOverContainer : true ,
4131
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
4155
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
4156
+ event : jasmine . anything ( )
4132
4157
} ) ;
4133
4158
4134
4159
cleanup ( ) ;
@@ -4163,7 +4188,8 @@ describe('CdkDrag', () => {
4163
4188
container : fixture . componentInstance . dropInstances . toArray ( ) [ 1 ] ,
4164
4189
previousContainer : fixture . componentInstance . dropInstances . first ,
4165
4190
isPointerOverContainer : true ,
4166
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
4191
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
4192
+ event : jasmine . anything ( )
4167
4193
} ) ;
4168
4194
} ) ) ;
4169
4195
0 commit comments