aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/effects.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/effects.js')
-rw-r--r--test/unit/effects.js54
1 files changed, 53 insertions, 1 deletions
diff --git a/test/unit/effects.js b/test/unit/effects.js
index d13bd587c..da1dd0a62 100644
--- a/test/unit/effects.js
+++ b/test/unit/effects.js
@@ -357,9 +357,26 @@ test("animate option (queue === false)", function () {
});
*/
+asyncTest( "animate option { queue: false }", function() {
+ expect( 2 );
+ var foo = jQuery( "#foo" );
+
+ foo.animate({
+ fontSize: "2em"
+ }, {
+ queue: false,
+ duration: 10,
+ complete: function() {
+ ok( true, "Animation Completed" );
+ start();
+ }
+ });
+
+ equals( foo.queue().length, 0, "Queue is empty" );
+});
+
asyncTest( "animate option { queue: 'name' }", function() {
expect( 5 );
-
var foo = jQuery( "#foo" ),
origWidth = foo.width(),
order = [];
@@ -608,6 +625,41 @@ test("stop(clearQueue, gotoEnd)", function() {
}, 100);
});
+asyncTest( "stop( ..., ..., queue ) - Stop single queues", function() {
+ expect( 3 );
+ var foo = jQuery( "#foo" ),
+ saved;
+
+ foo.width( 200 ).height( 200 );
+ foo.animate({
+ width: 400
+ },{
+ duration: 1000,
+ complete: function() {
+ equals( foo.width(), 400, "Animation completed for standard queue" );
+ equals( foo.height(), saved, "Height was not changed after the second stop")
+ start();
+ }
+ });
+
+ foo.animate({
+ height: 400
+ },{
+ duration: 1000,
+ queue: "height"
+ }).dequeue( "height" ).stop( false, true, "height" );
+
+ equals( foo.height(), 400, "Height was stopped with gotoEnd" );
+
+ foo.animate({
+ height: 200
+ },{
+ duration: 1000,
+ queue: "height"
+ }).dequeue( "height" ).stop( false, false, "height" );
+ saved = foo.height();
+})
+
test("toggle()", function() {
expect(6);
var x = jQuery("#foo");