mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
parent
4b39e131b5
commit
eefe81bbee
@ -26,7 +26,7 @@ module( "widget factory", {
|
|||||||
delete $.ui.testWidget;
|
delete $.ui.testWidget;
|
||||||
delete $.fn.testWidget;
|
delete $.fn.testWidget;
|
||||||
}
|
}
|
||||||
});
|
} );
|
||||||
|
|
||||||
common.testJshint( "form-reset-mixin" );
|
common.testJshint( "form-reset-mixin" );
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ asyncTest( "form reset", function() {
|
|||||||
|
|
||||||
inputs.testWidget();
|
inputs.testWidget();
|
||||||
form.on( "reset", function() {
|
form.on( "reset", function() {
|
||||||
setTimeout(function() {
|
setTimeout( function() {
|
||||||
deepEqual( $.ui.testWidget.refreshed, [ "input1", "input2", "input3", "input4" ],
|
deepEqual( $.ui.testWidget.refreshed, [ "input1", "input2", "input3", "input4" ],
|
||||||
"All widgets are refreshed on form reset" );
|
"All widgets are refreshed on form reset" );
|
||||||
equal( form.data( "ui-form-reset-instances" ).length, 4,
|
equal( form.data( "ui-form-reset-instances" ).length, 4,
|
||||||
@ -61,7 +61,7 @@ asyncTest( "destroy", function() {
|
|||||||
.testWidget( "destroy" );
|
.testWidget( "destroy" );
|
||||||
|
|
||||||
form.on( "reset", function() {
|
form.on( "reset", function() {
|
||||||
setTimeout(function() {
|
setTimeout( function() {
|
||||||
deepEqual( $.ui.testWidget.refreshed, [ "input1", "input3", "input4" ],
|
deepEqual( $.ui.testWidget.refreshed, [ "input1", "input3", "input4" ],
|
||||||
"All widgets are refreshed on form reset" );
|
"All widgets are refreshed on form reset" );
|
||||||
deepEqual( form.data( "ui-form-reset-instances" ).length, 3,
|
deepEqual( form.data( "ui-form-reset-instances" ).length, 3,
|
||||||
@ -82,7 +82,7 @@ asyncTest( "destroy all", function() {
|
|||||||
.testWidget( "destroy" );
|
.testWidget( "destroy" );
|
||||||
|
|
||||||
form.on( "reset", function() {
|
form.on( "reset", function() {
|
||||||
setTimeout(function() {
|
setTimeout( function() {
|
||||||
deepEqual( $.ui.testWidget.refreshed, [], "No widgets are refreshed after destroy" );
|
deepEqual( $.ui.testWidget.refreshed, [], "No widgets are refreshed after destroy" );
|
||||||
strictEqual( form.data( "ui-form-reset-instances" ), undefined,
|
strictEqual( form.data( "ui-form-reset-instances" ), undefined,
|
||||||
"Form data is removed when the last widget instance is destroyed" );
|
"Form data is removed when the last widget instance is destroyed" );
|
||||||
|
Loading…
Reference in New Issue
Block a user