]> source.dussan.org Git - jquery-ui.git/commitdiff
Tests: Fix draggable_options expected test count to be dynamic 1175/head
authorBrian J. Dowling <bjd-dev@simplicity.net>
Thu, 16 Jan 2014 21:25:17 +0000 (21:25 +0000)
committerBrian J. Dowling <bjd-dev@simplicity.net>
Thu, 16 Jan 2014 21:25:28 +0000 (21:25 +0000)
The test count was previously incremented to 8 when normally 6 tests
are run.  After figuring out the dynamic test code, I just made the
expect depend on the same array length

Also re-enabled the test in the Gruntfile since it now passes.

Gruntfile.js
tests/unit/draggable/draggable_options.js

index 31b21d910555ca24572cdf24fe97c72d035bae76..60d02efd0d80da14150a16acbf679d8f96a255a5 100644 (file)
@@ -182,7 +182,7 @@ grunt.initConfig({
                files: expandFiles( "tests/unit/**/*.html" ).filter(function( file ) {
                        // disabling everything that doesn't (quite) work with PhantomJS for now
                        // TODO except for all|index|test, try to include more as we go
-                       return !( /(all|index|test|dialog|tooltip|draggable)\.html$/ ).test( file );
+                       return !( /(all|index|test|dialog|tooltip)\.html$/ ).test( file );
                })
        },
        jshint: {
index 59ec9ce3595d1bc2ab5ac6a3315c2cb48b9ba9a0..f50359f999a56965349773852db5b24d9083568f 100644 (file)
@@ -686,7 +686,8 @@ test( "helper, default, switching after initialization", function() {
                        for ( k in scrollElements ) {
                                (function( position, helper, scrollElements, scrollElementsTitle ){
                                        test( "{ helper: '" + helper + "' }, " + position + ", with scroll offset on " + scrollElementsTitle, function() {
-                                               expect( 8 );
+                                               expect( scrollPositions.length * 2 );
+
                                                var i, j,
                                                        element = $( "#draggable1" ).css({ position: position, top: 0, left: 0 }).draggable({
                                                                helper: helper,