From 2df3c9f58def9584455f7c4bfdabbd12aab58bf9 Mon Sep 17 00:00:00 2001 From: Matias Niemelä Date: Thu, 26 Sep 2013 14:29:18 -0400 Subject: fix($animate): ensure transition-property is not changed when only keyframe animations are in use Closes #3933 --- test/ngAnimate/animateSpec.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'test/ngAnimate/animateSpec.js') diff --git a/test/ngAnimate/animateSpec.js b/test/ngAnimate/animateSpec.js index adedeac4..a3a1d0b0 100644 --- a/test/ngAnimate/animateSpec.js +++ b/test/ngAnimate/animateSpec.js @@ -1270,6 +1270,36 @@ describe("ngAnimate", function() { expect(child.hasClass('ng-enter-active')).toBe(false); })); + it("should not set the transition property flag if only CSS animations are used", + inject(function($compile, $rootScope, $animate, $sniffer) { + + if (!$sniffer.animations) return; + + ss.addRule('.ani.ng-enter', 'my_animation 2s linear;' + + vendorPrefix + 'animation: my_animation 2s linear'); + + ss.addRule('.trans.ng-enter', 'transition:1s linear all;' + + vendorPrefix + 'transition:1s linear all'); + + var element = html($compile('