Skip to content

Commit

Permalink
Fix unit tests for multi property override
Browse files Browse the repository at this point in the history
  • Loading branch information
Merrifield, Jay committed Sep 9, 2014
1 parent d5e28be commit 88f1bb8
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions test/css-transition-lib-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,26 +110,36 @@
easing = easing || 'linear';
$qunitFixture.css({position: 'absolute'});
$qunitFixture.css(property1, from1);
QUnit.expect(2);
if (usejQuery) {
CSSAnimate.transitionCssName = null;
}
if (!asyncTest) {
document.oHidden = true;
CSSAnimate.animate($qunitFixture, property1, to1, time1, easing);
CSSAnimate.animate($qunitFixture, property2, to2, time2, easing);
QUnit.equal(
$qunitFixture[0].style[$.camelCase(property1)],
CSSAnimate._getCssNumber($.camelCase(property1), to1),
'1st Transition RESOLVED'
);
QUnit.equal(
$qunitFixture[0].style[$.camelCase(property2)],
CSSAnimate._getCssNumber($.camelCase(property2), to2),
'2nd Transition RESOLVED'
);
if (property1 !== property2) {
QUnit.expect(2);
QUnit.equal(
$qunitFixture[0].style[$.camelCase(property1)],
CSSAnimate._getCssNumber($.camelCase(property1), to1),
'1st Transition RESOLVED'
);
QUnit.equal(
$qunitFixture[0].style[$.camelCase(property2)],
CSSAnimate._getCssNumber($.camelCase(property2), to2),
'2nd Transition RESOLVED'
);
} else {
QUnit.expect(1);
QUnit.equal(
$qunitFixture[0].style[$.camelCase(property2)],
CSSAnimate._getCssNumber($.camelCase(property2), to2),
'2nd Transition RESOLVED'
);
}
document.oHidden = false;
} else {
QUnit.expect(2);
var firstAnimPromise = CSSAnimate.animate($qunitFixture, property1, to1, time1, easing);
setTimeout(function () {
CSSAnimate.animate($qunitFixture, property2, to2, time2, easing).done(function () {
Expand Down

0 comments on commit 88f1bb8

Please sign in to comment.