@@ -190,6 +190,7 @@ describe('General igxDrag/igxDrop', () => {
190
190
191
191
spyOn ( firstDrag . ghostCreate , 'emit' ) ;
192
192
spyOn ( firstDrag . ghostDestroy , 'emit' ) ;
193
+ spyOn ( firstDrag . dragClick , 'emit' ) ;
193
194
expect ( document . getElementsByClassName ( 'dragElem' ) . length ) . toEqual ( 3 ) ;
194
195
195
196
// Step 1.
@@ -199,6 +200,7 @@ describe('General igxDrag/igxDrop', () => {
199
200
200
201
expect ( firstDrag . ghostCreate . emit ) . not . toHaveBeenCalled ( ) ;
201
202
expect ( firstDrag . ghostDestroy . emit ) . not . toHaveBeenCalled ( ) ;
203
+ expect ( firstDrag . dragClick . emit ) . not . toHaveBeenCalled ( ) ;
202
204
203
205
// Step 2.
204
206
UIInteractions . simulatePointerEvent ( 'pointermove' , firstElement , startingX + 10 , startingY + 10 ) ;
@@ -209,6 +211,7 @@ describe('General igxDrag/igxDrop', () => {
209
211
expect ( document . getElementsByClassName ( 'dragElem' ) . length ) . toEqual ( 3 ) ;
210
212
expect ( firstDrag . ghostCreate . emit ) . not . toHaveBeenCalled ( ) ;
211
213
expect ( firstDrag . ghostDestroy . emit ) . not . toHaveBeenCalled ( ) ;
214
+ expect ( firstDrag . dragClick . emit ) . not . toHaveBeenCalled ( ) ;
212
215
213
216
// Step 3.
214
217
// We need to trigger the pointerup on the ghostElement because this is the element we move and is under the mouse
@@ -220,6 +223,7 @@ describe('General igxDrag/igxDrop', () => {
220
223
expect ( document . getElementsByClassName ( 'dragElem' ) . length ) . toEqual ( 3 ) ;
221
224
expect ( firstDrag . ghostCreate . emit ) . not . toHaveBeenCalled ( ) ;
222
225
expect ( firstDrag . ghostDestroy . emit ) . not . toHaveBeenCalled ( ) ;
226
+ expect ( firstDrag . dragClick . emit ) . toHaveBeenCalled ( ) ;
223
227
} ) ) ;
224
228
225
229
it ( 'should position ghost at the same position relative to the mouse when drag started.' , ( async ( ) => {
@@ -454,6 +458,7 @@ describe('General igxDrag/igxDrop', () => {
454
458
firstDrag . dragTolerance = 25 ;
455
459
456
460
spyOn ( firstDrag . dragStart , 'emit' ) ;
461
+ spyOn ( firstDrag . dragClick , 'emit' ) ;
457
462
458
463
// Step 1.
459
464
UIInteractions . simulatePointerEvent ( 'pointerdown' , firstElement , startingX , startingY ) ;
@@ -471,6 +476,7 @@ describe('General igxDrag/igxDrop', () => {
471
476
expect ( firstElement . getBoundingClientRect ( ) . left ) . toEqual ( dragDirsRects [ 0 ] . left ) ;
472
477
expect ( firstElement . getBoundingClientRect ( ) . top ) . toEqual ( dragDirsRects [ 0 ] . top ) ;
473
478
expect ( firstDrag . dragStart . emit ) . not . toHaveBeenCalled ( ) ;
479
+ expect ( firstDrag . dragClick . emit ) . not . toHaveBeenCalled ( ) ;
474
480
475
481
// Step 3.
476
482
UIInteractions . simulatePointerEvent ( 'pointermove' , firstElement , startingX + 20 , startingY + 20 ) ;
@@ -481,6 +487,7 @@ describe('General igxDrag/igxDrop', () => {
481
487
expect ( firstElement . getBoundingClientRect ( ) . left ) . toEqual ( dragDirsRects [ 0 ] . left ) ;
482
488
expect ( firstElement . getBoundingClientRect ( ) . top ) . toEqual ( dragDirsRects [ 0 ] . top ) ;
483
489
expect ( firstDrag . dragStart . emit ) . not . toHaveBeenCalled ( ) ;
490
+ expect ( firstDrag . dragClick . emit ) . not . toHaveBeenCalled ( ) ;
484
491
485
492
// Step 4.
486
493
UIInteractions . simulatePointerEvent ( 'pointerup' , firstElement , startingX + 20 , startingY + 20 ) ;
@@ -490,6 +497,7 @@ describe('General igxDrag/igxDrop', () => {
490
497
expect ( firstElement . getBoundingClientRect ( ) . left ) . toEqual ( dragDirsRects [ 0 ] . left ) ;
491
498
expect ( firstElement . getBoundingClientRect ( ) . top ) . toEqual ( dragDirsRects [ 0 ] . top ) ;
492
499
expect ( firstDrag . dragStart . emit ) . not . toHaveBeenCalled ( ) ;
500
+ expect ( firstDrag . dragClick . emit ) . toHaveBeenCalled ( ) ;
493
501
} ) ) ;
494
502
495
503
it ( 'should correctly apply dragTolerance of 0 when it is set to 0 and ghost is disabled.' , ( async ( ) => {
0 commit comments