Skip to content

Fix 1144 (Fix and Re-enable some unit tests on dialog, tooltip, and draggable) #1173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,14 @@ 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)\.html$/ ).test( file );
})
return !( /(all|index|test)\.html$/ ).test( file );
}),
options: {
page: {
viewportSize: { width: 700, height: 500 }
}
}
},
jshint: {
options: {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/dialog/dialog_events.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,9 @@ test("ensure dialog keeps focus when clicking modal overlay", function() {
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();
});

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/dialog/dialog_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ asyncTest( "#4421 - Focus lost from dialog which uses show-effect", function() {
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();
}
Expand Down