|
124 | 124 | }); |
125 | 125 | }); |
126 | 126 | }); |
127 | | - function testEndFunction(eventName) { |
128 | | - describe('when the uiGridScroller has been initiated with a touch event', function() { |
129 | | - beforeEach(function() { |
130 | | - uiGridScroller.isAnimating = false; |
131 | | - uiGridScroller.initiated = uiGridScrollerConstants.scrollType.TOUCHABLE; |
132 | | - element.trigger(eventName, { |
133 | | - touches: [{ |
134 | | - pageX: 0, |
135 | | - pageY: 0 |
136 | | - }] |
137 | | - }); |
138 | | - }); |
139 | | - it('should update the uiGridScroller.initiated value to NONE', function() { |
140 | | - expect(uiGridScroller.initiated).toEqual(uiGridScrollerConstants.scrollType.NONE); |
141 | | - }); |
142 | | - it('should update the uiGridScroller.isAnimating value to true', function() { |
143 | | - expect(uiGridScroller.isAnimating).toBe(true); |
144 | | - }); |
145 | | - it('should call requestAnimationFrame in the window', function() { |
146 | | - expect(window.requestAnimationFrame).toHaveBeenCalled(); |
147 | | - }); |
148 | | - }); |
149 | | - describe('when the uiGridScroller has not been initiated with a touch event', function() { |
150 | | - beforeEach(function() { |
151 | | - uiGridScroller.isAnimating = false; |
152 | | - uiGridScroller.initiated = uiGridScrollerConstants.scrollType.MOUSE; |
153 | | - element.trigger(eventName, { |
154 | | - touches: [{ |
155 | | - pageX: 0, |
156 | | - pageY: 0 |
157 | | - }] |
158 | | - }); |
159 | | - }); |
160 | | - it('should not update the uiGridScroller.initiated value', function() { |
161 | | - expect(uiGridScroller.initiated).toEqual(uiGridScrollerConstants.scrollType.MOUSE); |
162 | | - }); |
163 | | - it('should not update the uiGridScroller.isAnimating value', function() { |
164 | | - expect(uiGridScroller.isAnimating).toBe(false); |
165 | | - }); |
166 | | - it('should not call requestAnimationFrame in the window', function() { |
167 | | - expect(window.requestAnimationFrame).not.toHaveBeenCalled(); |
168 | | - }); |
169 | | - }); |
170 | | - } |
171 | | - describe('on touchend', function() { |
172 | | - testEndFunction('touchend'); |
173 | | - }); |
174 | | - describe('on touchcancel', function() { |
175 | | - testEndFunction('touchcancel'); |
176 | | - }); |
| 127 | + // function testEndFunction(eventName) { |
| 128 | + // describe('when the uiGridScroller has been initiated with a touch event', function() { |
| 129 | + // beforeEach(function() { |
| 130 | + // uiGridScroller.isAnimating = false; |
| 131 | + // uiGridScroller.initiated = uiGridScrollerConstants.scrollType.TOUCHABLE; |
| 132 | + // element.trigger(eventName, { |
| 133 | + // touches: [{ |
| 134 | + // pageX: 0, |
| 135 | + // pageY: 0 |
| 136 | + // }] |
| 137 | + // }); |
| 138 | + // }); |
| 139 | + // it('should update the uiGridScroller.initiated value to NONE', function() { |
| 140 | + // expect(uiGridScroller.initiated).toEqual(uiGridScrollerConstants.scrollType.NONE); |
| 141 | + // }); |
| 142 | + // it('should update the uiGridScroller.isAnimating value to true', function() { |
| 143 | + // expect(uiGridScroller.isAnimating).toBe(true); |
| 144 | + // }); |
| 145 | + // it('should call requestAnimationFrame in the window', function() { |
| 146 | + // expect(window.requestAnimationFrame).toHaveBeenCalled(); |
| 147 | + // }); |
| 148 | + // }); |
| 149 | + // describe('when the uiGridScroller has not been initiated with a touch event', function() { |
| 150 | + // beforeEach(function() { |
| 151 | + // uiGridScroller.isAnimating = false; |
| 152 | + // uiGridScroller.initiated = uiGridScrollerConstants.scrollType.MOUSE; |
| 153 | + // element.trigger(eventName, { |
| 154 | + // touches: [{ |
| 155 | + // pageX: 0, |
| 156 | + // pageY: 0 |
| 157 | + // }] |
| 158 | + // }); |
| 159 | + // }); |
| 160 | + // it('should not update the uiGridScroller.initiated value', function() { |
| 161 | + // expect(uiGridScroller.initiated).toEqual(uiGridScrollerConstants.scrollType.MOUSE); |
| 162 | + // }); |
| 163 | + // it('should not update the uiGridScroller.isAnimating value', function() { |
| 164 | + // expect(uiGridScroller.isAnimating).toBe(false); |
| 165 | + // }); |
| 166 | + // it('should not call requestAnimationFrame in the window', function() { |
| 167 | + // expect(window.requestAnimationFrame).not.toHaveBeenCalled(); |
| 168 | + // }); |
| 169 | + // }); |
| 170 | + // } |
| 171 | + // describe('on touchend', function() { |
| 172 | + // testEndFunction('touchend'); |
| 173 | + // }); |
| 174 | + // describe('on touchcancel', function() { |
| 175 | + // testEndFunction('touchcancel'); |
| 176 | + // }); |
177 | 177 | }); |
178 | 178 | afterEach(function() { |
179 | 179 | element.on.calls.reset(); |
|
0 commit comments