@@ -345,7 +345,10 @@ describe('CdkDrag', () => {
345
345
346
346
// Assert the event like this, rather than `toHaveBeenCalledWith`, because Jasmine will
347
347
// go into an infinite loop trying to stringify the event, if the test fails.
348
- expect ( event ) . toEqual ( { source : fixture . componentInstance . dragInstance } ) ;
348
+ expect ( event ) . toEqual ( {
349
+ source : fixture . componentInstance . dragInstance ,
350
+ event : jasmine . anything ( )
351
+ } ) ;
349
352
} ) ) ;
350
353
351
354
it ( 'should dispatch an event when the user has stopped dragging' , fakeAsync ( ( ) => {
@@ -362,7 +365,8 @@ describe('CdkDrag', () => {
362
365
// go into an infinite loop trying to stringify the event, if the test fails.
363
366
expect ( event ) . toEqual ( {
364
367
source : fixture . componentInstance . dragInstance ,
365
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
368
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
369
+ event : jasmine . anything ( )
366
370
} ) ;
367
371
} ) ) ;
368
372
@@ -375,15 +379,17 @@ describe('CdkDrag', () => {
375
379
376
380
expect ( event ) . toEqual ( {
377
381
source : jasmine . anything ( ) ,
378
- distance : { x : 25 , y : 30 }
382
+ distance : { x : 25 , y : 30 } ,
383
+ event : jasmine . anything ( )
379
384
} ) ;
380
385
381
386
dragElementViaMouse ( fixture , fixture . componentInstance . dragElement . nativeElement , 40 , 50 ) ;
382
387
event = fixture . componentInstance . endedSpy . calls . mostRecent ( ) . args [ 0 ] ;
383
388
384
389
expect ( event ) . toEqual ( {
385
390
source : jasmine . anything ( ) ,
386
- distance : { x : 40 , y : 50 }
391
+ distance : { x : 40 , y : 50 } ,
392
+ event : jasmine . anything ( )
387
393
} ) ;
388
394
} ) ) ;
389
395
@@ -1546,7 +1552,8 @@ describe('CdkDrag', () => {
1546
1552
container : fixture . componentInstance . dropInstance ,
1547
1553
previousContainer : fixture . componentInstance . dropInstance ,
1548
1554
isPointerOverContainer : true ,
1549
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
1555
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
1556
+ event : jasmine . anything ( )
1550
1557
} ) ;
1551
1558
1552
1559
expect ( dragItems . map ( drag => drag . element . nativeElement . textContent ! . trim ( ) ) )
@@ -1672,7 +1679,8 @@ describe('CdkDrag', () => {
1672
1679
container : fixture . componentInstance . dropInstance ,
1673
1680
previousContainer : fixture . componentInstance . dropInstance ,
1674
1681
isPointerOverContainer : false ,
1675
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
1682
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
1683
+ event : jasmine . anything ( )
1676
1684
} ) ;
1677
1685
1678
1686
expect ( dragItems . map ( drag => drag . element . nativeElement . textContent ! . trim ( ) ) )
@@ -1731,7 +1739,8 @@ describe('CdkDrag', () => {
1731
1739
container : fixture . componentInstance . dropInstance ,
1732
1740
previousContainer : fixture . componentInstance . dropInstance ,
1733
1741
isPointerOverContainer : true ,
1734
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
1742
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
1743
+ event : jasmine . anything ( )
1735
1744
} ) ;
1736
1745
1737
1746
expect ( dragItems . map ( drag => drag . element . nativeElement . textContent ! . trim ( ) ) )
@@ -1772,7 +1781,8 @@ describe('CdkDrag', () => {
1772
1781
container : fixture . componentInstance . dropInstance ,
1773
1782
previousContainer : fixture . componentInstance . dropInstance ,
1774
1783
isPointerOverContainer : true ,
1775
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
1784
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
1785
+ event : jasmine . anything ( )
1776
1786
} ) ;
1777
1787
1778
1788
expect ( dragItems . map ( drag => drag . element . nativeElement . textContent ! . trim ( ) ) )
@@ -1809,7 +1819,8 @@ describe('CdkDrag', () => {
1809
1819
container : fixture . componentInstance . dropInstance ,
1810
1820
previousContainer : fixture . componentInstance . dropInstance ,
1811
1821
isPointerOverContainer : false ,
1812
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
1822
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
1823
+ event : jasmine . anything ( )
1813
1824
} ) ;
1814
1825
1815
1826
expect ( dragItems . map ( drag => drag . element . nativeElement . textContent ! . trim ( ) ) )
@@ -1852,7 +1863,8 @@ describe('CdkDrag', () => {
1852
1863
container : fixture . componentInstance . dropInstance ,
1853
1864
previousContainer : fixture . componentInstance . dropInstance ,
1854
1865
isPointerOverContainer : jasmine . any ( Boolean ) ,
1855
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
1866
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
1867
+ event : jasmine . anything ( )
1856
1868
} ) ;
1857
1869
} ) ) ;
1858
1870
@@ -1900,7 +1912,8 @@ describe('CdkDrag', () => {
1900
1912
container : fixture . componentInstance . dropInstance ,
1901
1913
previousContainer : fixture . componentInstance . dropInstance ,
1902
1914
isPointerOverContainer : jasmine . any ( Boolean ) ,
1903
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
1915
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
1916
+ event : jasmine . anything ( )
1904
1917
} ) ;
1905
1918
1906
1919
scrollTo ( 0 , 0 ) ;
@@ -3172,7 +3185,8 @@ describe('CdkDrag', () => {
3172
3185
container : dropInstance ,
3173
3186
previousContainer : dropInstance ,
3174
3187
isPointerOverContainer : true ,
3175
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3188
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3189
+ event : jasmine . anything ( )
3176
3190
} ) ;
3177
3191
3178
3192
expect ( dragItems . map ( drag => drag . element . nativeElement . textContent ! . trim ( ) ) )
@@ -3724,7 +3738,8 @@ describe('CdkDrag', () => {
3724
3738
container : fixture . componentInstance . dropInstances . toArray ( ) [ 1 ] ,
3725
3739
previousContainer : fixture . componentInstance . dropInstances . first ,
3726
3740
isPointerOverContainer : true ,
3727
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3741
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3742
+ event : jasmine . anything ( )
3728
3743
} ) ;
3729
3744
} ) ) ;
3730
3745
@@ -3827,7 +3842,8 @@ describe('CdkDrag', () => {
3827
3842
container : dropInstances [ 1 ] ,
3828
3843
previousContainer : dropInstances [ 0 ] ,
3829
3844
isPointerOverContainer : true ,
3830
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3845
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3846
+ event : jasmine . anything ( )
3831
3847
} ) ;
3832
3848
} ) ) ;
3833
3849
@@ -3858,7 +3874,8 @@ describe('CdkDrag', () => {
3858
3874
container : dropInstances [ 0 ] ,
3859
3875
previousContainer : dropInstances [ 0 ] ,
3860
3876
isPointerOverContainer : false ,
3861
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3877
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3878
+ event : jasmine . anything ( )
3862
3879
} ) ;
3863
3880
} ) ) ;
3864
3881
@@ -3889,7 +3906,8 @@ describe('CdkDrag', () => {
3889
3906
container : dropInstances [ 0 ] ,
3890
3907
previousContainer : dropInstances [ 0 ] ,
3891
3908
isPointerOverContainer : false ,
3892
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
3909
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
3910
+ event : jasmine . anything ( )
3893
3911
} ) ;
3894
3912
} ) ) ;
3895
3913
@@ -4040,7 +4058,8 @@ describe('CdkDrag', () => {
4040
4058
container : dropInstances [ 1 ] ,
4041
4059
previousContainer : dropInstances [ 0 ] ,
4042
4060
isPointerOverContainer : true ,
4043
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
4061
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
4062
+ event : jasmine . anything ( )
4044
4063
} ) ;
4045
4064
} ) ) ;
4046
4065
@@ -4067,7 +4086,8 @@ describe('CdkDrag', () => {
4067
4086
container : dropInstances [ 1 ] ,
4068
4087
previousContainer : dropInstances [ 0 ] ,
4069
4088
isPointerOverContainer : true ,
4070
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
4089
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
4090
+ event : jasmine . anything ( )
4071
4091
} ) ;
4072
4092
} ) ) ;
4073
4093
@@ -4099,7 +4119,8 @@ describe('CdkDrag', () => {
4099
4119
container : dropInstances [ 1 ] ,
4100
4120
previousContainer : dropInstances [ 0 ] ,
4101
4121
isPointerOverContainer : true ,
4102
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
4122
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
4123
+ event : jasmine . anything ( )
4103
4124
} ) ;
4104
4125
} ) ) ;
4105
4126
@@ -4135,7 +4156,8 @@ describe('CdkDrag', () => {
4135
4156
container : fixture . componentInstance . dropInstances . toArray ( ) [ 1 ] ,
4136
4157
previousContainer : fixture . componentInstance . dropInstances . first ,
4137
4158
isPointerOverContainer : true ,
4138
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
4159
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
4160
+ event : jasmine . anything ( )
4139
4161
} ) ;
4140
4162
4141
4163
expect ( dropContainers [ 0 ] . contains ( item . element . nativeElement ) ) . toBe ( true ,
@@ -4232,7 +4254,8 @@ describe('CdkDrag', () => {
4232
4254
container : dropInstances [ 0 ] ,
4233
4255
previousContainer : dropInstances [ 0 ] ,
4234
4256
isPointerOverContainer : false ,
4235
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
4257
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
4258
+ event : jasmine . anything ( )
4236
4259
} ) ;
4237
4260
} ) ) ;
4238
4261
@@ -4353,7 +4376,8 @@ describe('CdkDrag', () => {
4353
4376
container : dropInstances [ 2 ] ,
4354
4377
previousContainer : dropInstances [ 0 ] ,
4355
4378
isPointerOverContainer : false ,
4356
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
4379
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
4380
+ event : jasmine . anything ( )
4357
4381
} ) ) ;
4358
4382
4359
4383
} ) ) ;
@@ -4570,7 +4594,8 @@ describe('CdkDrag', () => {
4570
4594
container : fixture . componentInstance . dropInstances . toArray ( ) [ 1 ] ,
4571
4595
previousContainer : fixture . componentInstance . dropInstances . first ,
4572
4596
isPointerOverContainer : true ,
4573
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
4597
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
4598
+ event : jasmine . anything ( )
4574
4599
} ) ;
4575
4600
4576
4601
cleanup ( ) ;
@@ -4605,7 +4630,8 @@ describe('CdkDrag', () => {
4605
4630
container : fixture . componentInstance . dropInstances . toArray ( ) [ 1 ] ,
4606
4631
previousContainer : fixture . componentInstance . dropInstances . first ,
4607
4632
isPointerOverContainer : true ,
4608
- distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) }
4633
+ distance : { x : jasmine . any ( Number ) , y : jasmine . any ( Number ) } ,
4634
+ event : jasmine . anything ( )
4609
4635
} ) ;
4610
4636
} ) ) ;
4611
4637
0 commit comments