|
33 | 33 | it('should initialize uiGridScroller.initiated to NONE', function() {
|
34 | 34 | expect(uiGridScroller.initiated).toEqual(uiGridScrollerConstants.scrollType.NONE);
|
35 | 35 | });
|
| 36 | + it('should initialize touchstart', function() { |
| 37 | + expect(element.on).toHaveBeenCalledWith('touchstart', jasmine.any(Function)); |
| 38 | + }); |
| 39 | + it('should initialize touchmove', function() { |
| 40 | + expect(element.on).toHaveBeenCalledWith('touchmove', jasmine.any(Function)); |
| 41 | + }); |
| 42 | + it('should initialize touchend', function() { |
| 43 | + expect(element.on).toHaveBeenCalledWith('touchend', jasmine.any(Function)); |
| 44 | + }); |
| 45 | + it('should initialize touchcancel', function() { |
| 46 | + expect(element.on).toHaveBeenCalledWith('touchcancel', jasmine.any(Function)); |
| 47 | + }); |
36 | 48 | xdescribe('events', function() {
|
37 | 49 | describe('on touchstart', function() {
|
38 | 50 | beforeEach(function() {
|
|
46 | 58 | });
|
47 | 59 | uiGridScroller(element, scrollHandler);
|
48 | 60 | });
|
49 |
| - it('should be initialized', function() { |
50 |
| - expect(element.on).toHaveBeenCalledWith('touchstart', jasmine.any(Function)); |
51 |
| - }); |
52 | 61 | it('should remove the scroll event from the element', function() {
|
53 | 62 | expect(element.off).toHaveBeenCalledWith('scroll', scrollHandler);
|
54 | 63 | });
|
|
74 | 83 | }
|
75 | 84 | });
|
76 | 85 | });
|
77 |
| - it('should be initialized', function() { |
78 |
| - expect(element.on).toHaveBeenCalledWith('touchmove', jasmine.any(Function)); |
79 |
| - }); |
80 | 86 | describe('when the uiGridScroller has been initiated with a touch event', function() {
|
81 | 87 | beforeEach(function() {
|
82 | 88 | uiGridScroller.initiated = uiGridScrollerConstants.scrollType.TOUCHABLE;
|
|
139 | 145 | }
|
140 | 146 | });
|
141 | 147 | });
|
142 |
| - it('should be initialized', function() { |
143 |
| - expect(element.on).toHaveBeenCalledWith('touchend', jasmine.any(Function)); |
144 |
| - }); |
145 | 148 | testEndFunction();
|
146 | 149 | });
|
147 | 150 | describe('on touchcancel', function() {
|
|
0 commit comments