diff --git a/Gruntfile.js b/Gruntfile.js index 24b9632f0b7..f31216ed80d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -178,11 +178,16 @@ grunt.initConfig({ }) }, qunit: { - 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 ); - }) + 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)\.html$/ ).test( file ); + }), + options: { + page : { + viewportSize : { width: 700, height: 500 } + } + } }, jshint: { options: { diff --git a/package.json b/package.json index a802617b18a..57b953ed696 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ }, "dependencies": {}, "devDependencies": { - "grunt": "0.4.1", + "grunt": "~0.4.2", "grunt-contrib-jshint": "0.7.1", "grunt-contrib-uglify": "0.1.1", "grunt-contrib-concat": "0.1.3", diff --git a/tests/unit/dialog/dialog_events.js b/tests/unit/dialog/dialog_events.js index 1384500f68e..8b1ed7b41da 100644 --- a/tests/unit/dialog/dialog_events.js +++ b/tests/unit/dialog/dialog_events.js @@ -361,9 +361,9 @@ test("ensure dialog keeps focus when clicking modal overlay", function() { var element = $( "
" ).dialog({ modal: true }); - ok( $(":focus").closest(".ui-dialog").length, "focus is in dialog" ); + equal( $(document.activeElement).closest(".ui-dialog").length, 1, "focus is in dialog" ); $(".ui-widget-overlay").simulate("mousedown"); - ok( $(":focus").closest(".ui-dialog").length, "focus is still in dialog" ); + equal( $(document.activeElement).closest(".ui-dialog").length, 1, "focus is still in dialog" ); element.remove(); }); diff --git a/tests/unit/dialog/dialog_options.js b/tests/unit/dialog/dialog_options.js index 66aeebde0be..87f3553bedc 100644 --- a/tests/unit/dialog/dialog_options.js +++ b/tests/unit/dialog/dialog_options.js @@ -558,7 +558,7 @@ asyncTest( "#4421 - Focus lost from dialog which uses show-effect", function() { var element = $( "
" ).dialog({ show: "blind", focus: function() { - equal( element.dialog( "widget" ).find( ":focus" ).length, 1, "dialog maintains focus" ); + equal( element.dialog( "widget" ).find( document.activeElement ).length, 1, "dialog maintains focus" ); element.remove(); start(); }