diff options
| author | Pete Bacon Darwin | 2013-04-23 12:34:53 +0100 |
|---|---|---|
| committer | Pete Bacon Darwin | 2013-05-01 13:57:44 +0100 |
| commit | 660605bdb834bbbb31529b86f5b870c5861ff497 (patch) | |
| tree | b9f2f276c9ad43527cbdddfc1de7f81f439f080d /test/ng/directive/ngIncludeSpec.js | |
| parent | 89c0b5d096686aa0478dc5ca543acbf64223b688 (diff) | |
| download | angular.js-660605bdb834bbbb31529b86f5b870c5861ff497.tar.bz2 | |
test(ngAnimate): also provide W3C transition property to work on IE10
Closes: #2492
Diffstat (limited to 'test/ng/directive/ngIncludeSpec.js')
| -rw-r--r-- | test/ng/directive/ngIncludeSpec.js | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/test/ng/directive/ngIncludeSpec.js b/test/ng/directive/ngIncludeSpec.js index 9b5319f1..a990a840 100644 --- a/test/ng/directive/ngIncludeSpec.js +++ b/test/ng/directive/ngIncludeSpec.js @@ -291,6 +291,11 @@ describe('ngInclude ngAnimate', function() { return element; } + function applyCSS(element, cssProp, cssValue) { + element.css(cssProp, cssValue); + element.css(vendorPrefix + cssProp, cssValue); + } + beforeEach(function() { // we need to run animation on attached elements; body = jqLite(document.body); @@ -328,9 +333,7 @@ describe('ngInclude ngAnimate', function() { //if we add the custom css stuff here then it will get picked up before the animation takes place var child = jqLite(element.children()[0]); - var cssProp = vendorPrefix + 'transition'; - var cssValue = '1s linear all'; - child.css(cssProp, cssValue); + applyCSS(child, 'transition', '1s linear all'); if ($sniffer.supportsTransitions) { expect(child.attr('class')).toContain('custom-enter-setup'); @@ -360,9 +363,7 @@ describe('ngInclude ngAnimate', function() { //if we add the custom css stuff here then it will get picked up before the animation takes place var child = jqLite(element.children()[0]); - var cssProp = vendorPrefix + 'transition'; - var cssValue = '1s linear all'; - child.css(cssProp, cssValue); + applyCSS(child, 'transition', '1s linear all'); $rootScope.tpl = ''; $rootScope.$digest(); @@ -395,9 +396,7 @@ describe('ngInclude ngAnimate', function() { //if we add the custom css stuff here then it will get picked up before the animation takes place var child = jqLite(element.children()[0]); - var cssProp = vendorPrefix + 'transition'; - var cssValue = '0.5s linear all'; - child.css(cssProp, cssValue); + applyCSS(child, 'transition', '0.5s linear all'); $rootScope.tpl = 'enter'; $rootScope.$digest(); |
