Skip to content

Commit

Permalink
Effects: Use new has/lacksClasses assertions for all class checks
Browse files Browse the repository at this point in the history
  • Loading branch information
arschmitz committed Mar 11, 2015
1 parent 15a9ed7 commit 53d1bc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/unit/effects/effects.html
Expand Up @@ -9,6 +9,7 @@
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/jquery-simulate/jquery.simulate.js"></script> <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
<script src="../testsuite.js"></script> <script src="../testsuite.js"></script>
<script src="../../../external/qunit-assert-classes/qunit-assert-classes.js"></script>
<script> <script>
TestHelpers.loadResources({ TestHelpers.loadResources({
js: [ js: [
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/effects/effects_core.js
Expand Up @@ -182,13 +182,14 @@ asyncTest( "animateClass clears style properties when stopped", function() {
start(); start();
}); });


asyncTest( "animateClass: css and class changes during animation are not lost (#7106)", function() { asyncTest( "animateClass: css and class changes during animation are not lost (#7106)",
function( assert ) {
expect( 2 ); expect( 2 );
var test = $( "div.ticket7106" ); var test = $( "div.ticket7106" );


// ensure the class stays and that the css property stays // ensure the class stays and that the css property stays
function animationComplete() { function animationComplete() {
ok( test.hasClass( "testClass" ), "class change during animateClass was not lost" ); assert.hasClasses( test, "testClass", "class change during animateClass was not lost" );
equal( test.height(), 100, "css change during animateClass was not lost" ); equal( test.height(), 100, "css change during animateClass was not lost" );
start(); start();
} }
Expand Down

0 comments on commit 53d1bc2

Please sign in to comment.