From 529ca549223a524822f470911361b54cb9c548f5 Mon Sep 17 00:00:00 2001 From: Vitaliy Bobrov Date: Thu, 28 Apr 2016 18:16:56 +0300 Subject: [PATCH] Fix refreshController unit tests --- test/unit/angular/controller/refreshController.unit.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/angular/controller/refreshController.unit.js b/test/unit/angular/controller/refreshController.unit.js index d5741f14fd4..66889652320 100644 --- a/test/unit/angular/controller/refreshController.unit.js +++ b/test/unit/angular/controller/refreshController.unit.js @@ -47,7 +47,7 @@ describe('$ionicRefresh Controller', function() { setup(); function getTy(el) { - return parseInt(el.style[ionic.CSS.TRANSFORM].replace('translate3d(0, ', '')); + return parseInt(el.style[ionic.CSS.TRANSFORM].replace('translate3d(0px, ', '')); } ctrl.__handleTouchmove(evt(0)); @@ -68,14 +68,14 @@ describe('$ionicRefresh Controller', function() { ctrl.__handleTouchmove(evt(10)); expect(refresher.classList.contains('invisible')).toBe(false); ctrl.__handleTouchmove(evt(0)); - expect(ctrl.__getScrollChild().style[ionic.CSS.TRANSFORM]).toBe('translate3d(0, 0px, 0)'); + expect(ctrl.__getScrollChild().style[ionic.CSS.TRANSFORM]).toBe('translate3d(0px, 0px, 0px)'); expect(ctrl.__getScrollChild().classList.contains('overscroll')).toBe(false); expect(refresher.classList.contains('invisible')).toBe(true); }); it('should activate and deactivate when dragging past activation threshold', function() { function getTy(el) { - return parseInt(el.style[ionic.CSS.TRANSFORM].replace('translate3d(0, ', '')); + return parseInt(el.style[ionic.CSS.TRANSFORM].replace('translate3d(0px, ', '')); } setup(); var domMethods = ctrl.getRefresherDomMethods(); @@ -92,7 +92,7 @@ describe('$ionicRefresh Controller', function() { ctrl.__handleTouchmove(evt(0)); timeout.flush(); - expect(ctrl.__getScrollChild().style[ionic.CSS.TRANSFORM]).toBe('translate3d(0, 0px, 0)'); + expect(ctrl.__getScrollChild().style[ionic.CSS.TRANSFORM]).toBe('translate3d(0px, 0px, 0px)'); expect(ctrl.__getScrollChild().classList.contains('overscroll')).toBe(false); expect(refresher.classList.contains('invisible')).toBe(true); expect(refresher.classList.contains('active')).toBe(false);