aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-09-27 10:44:04 -0400
committerScott González <scott.gonzalez@gmail.com>2010-09-27 10:44:04 -0400
commit0b6710aed7fc9a9412a975c9f70d3fd6a87c4b02 (patch)
treea56ed80d31787977587faa4e01b0d81825fba4f1 /tests
parentadcafce7a24156c503061eb354867e41064fd89f (diff)
downloadjquery-ui-0b6710aed7fc9a9412a975c9f70d3fd6a87c4b02.tar.gz
jquery-ui-0b6710aed7fc9a9412a975c9f70d3fd6a87c4b02.zip
Progressbar: Added a complete event. Fixes #3500 - Progressbar callback at the end.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/progressbar/progressbar_events.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/unit/progressbar/progressbar_events.js b/tests/unit/progressbar/progressbar_events.js
index b273cd5e9..22b301abe 100644
--- a/tests/unit/progressbar/progressbar_events.js
+++ b/tests/unit/progressbar/progressbar_events.js
@@ -14,4 +14,25 @@ test("change", function() {
}).progressbar("value", 5);
});
+test( "complete", function() {
+ expect( 3 );
+ var changes = 0,
+ value;
+
+ $( "#progressbar" ).progressbar({
+ change: function() {
+ changes++;
+ same( $( this ).progressbar( "value" ), value, "change at " + value );
+ },
+ complete: function() {
+ equal( changes, 2, "complete triggered after change" );
+ }
+ });
+
+ value = 5;
+ $( "#progressbar" ).progressbar( "value", value );
+ value = 100;
+ $( "#progressbar" ).progressbar( "value", value );
+});
+
})(jQuery);