mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
test(infiniteScroll): Fix unit test for PhantomJS bug
Phantom JS bug details: https://github.com/ariya/phantomjs/issues/11289
This commit is contained in:
@@ -192,8 +192,9 @@ describe('ionicInfiniteScroll directive', function() {
|
||||
expect(el.scope().foo).not.toBe(1);
|
||||
|
||||
var el = setupNative('on-infinite="foo=1"');
|
||||
var scrollEvent = new Event('scroll');
|
||||
ctrl.scrollEl.dispatchEvent(scrollEvent);
|
||||
var evObj = document.createEvent('HTMLEvents');
|
||||
evObj.initEvent('scroll', true, true, window, 1, 12, 345, 7, 220, false, false, true, false, 0, null);
|
||||
ctrl.scrollEl.dispatchEvent(evObj);
|
||||
|
||||
expect(el.hasClass('active')).toBe(false);
|
||||
expect(ctrl.isLoading).toBe(false);
|
||||
|
||||
Reference in New Issue
Block a user