Some unit tests were disabled in phantomjs. Dialog and draggable
depended on a larger viewPort. Tooltip just worked, that was reenabled
as well.
Closes gh-1173
},
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)\.html$/ ).test( file );
- })
+ return !( /(all|index|test)\.html$/ ).test( file );
+ }),
+ options: {
+ page: {
+ viewportSize: { width: 700, height: 500 }
+ }
+ }
},
jshint: {
options: {
var element = $( "<div></div>" ).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();
});
var element = $( "<div></div>" ).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();
}