]> source.dussan.org Git - jquery-ui.git/commitdiff
Draggable Tests: don't test auto scroll while testing helpers.
authorMike Sherov <mike.sherov@gmail.com>
Fri, 1 Nov 2013 01:41:45 +0000 (21:41 -0400)
committerMike Sherov <mike.sherov@gmail.com>
Fri, 1 Nov 2013 01:41:45 +0000 (21:41 -0400)
tests/unit/draggable/draggable_options.js
tests/unit/draggable/draggable_test_helpers.js

index 8c4685fa832337e2ed0ced82743b044ec20e357e..ea52eb29923a6f8a66b8fca0576bf7c101260dce 100644 (file)
@@ -676,19 +676,20 @@ test( "helper, default, switching after initialization", function() {
                        "parent and root": [ "#main", document ],
                        "grandparent": [ "#scrollParent" ]
                },
-               positions = [ "absolute", "fixed", "relative" ],
+               positions = [ "absolute", "fixed", "relative", "static" ],
                helpers = [ "original", "clone" ],
-               scrollPositions = [ "relative", "static", "absolute" ];
+               scrollPositions = [ "relative", "static", "absolute", "fixed" ];
 
        for ( m = 0 ; m < helpers.length; m++ ) {
                for ( l = 0; l < positions.length; l++ ) {
                        for ( k in scrollElements ) {
                                (function( position, helper, scrollElements, scrollElementsTitle ){
                                        test( "{ helper: '" + helper + "' }, " + position + ", with scroll offset on " + scrollElementsTitle, function() {
-                                               expect( 6 );
+                                               expect( 8 );
                                                var i, j,
                                                        element = $( "#draggable1" ).css({ position: position, top: 0, left: 0 }).draggable({
-                                                               helper: helper
+                                                               helper: helper,
+                                                               scroll: false
                                                        });
 
                                                if ( scrollElements.length === 1 && scrollElements[ 1 ] === "#scrollParent" ) {
index 928e87f2664553545acb6d485eaad6dafb41c3c6..0b533a4e1ba96e701357e905ef96cd11fa08d52e 100644 (file)
@@ -30,10 +30,7 @@ TestHelpers.draggable = {
 
                $( handle ).simulate( "drag", {
                        dx: dx,
-                       dy: dy,
-                       // moves is 1 here because simulate currently fire events synchronously
-                       // so we can't faithfully test things that rely on a scroll event (which is async)
-                       moves: 1
+                       dy: dy
                });
        },
        shouldMovePositionButNotOffset: function( el, msg, handle ) {
@@ -43,10 +40,7 @@ TestHelpers.draggable = {
 
                $( handle ).simulate( "drag", {
                        dx: 100,
-                       dy: 100,
-                       // moves is 1 here because simulate currently fire events synchronously
-                       // so we can't faithfully test things that rely on a scroll event (which is async)
-                       moves: 1
+                       dy: 100
                });
        },
        shouldMove: function( el, msg, handle ) {