diff options
author | Richard Worth <rdworth@gmail.com> | 2009-02-04 04:39:31 +0000 |
---|---|---|
committer | Richard Worth <rdworth@gmail.com> | 2009-02-04 04:39:31 +0000 |
commit | 04b304031193ff08f2aaac61ce65fefef025adea (patch) | |
tree | 595324bbede23fb620b0a57e5dc689066bda426f /tests/unit/progressbar/progressbar.js | |
parent | 52005f42dda87e4dc06d5688c27bf6b82ad80621 (diff) | |
download | jquery-ui-04b304031193ff08f2aaac61ce65fefef025adea.tar.gz jquery-ui-04b304031193ff08f2aaac61ce65fefef025adea.zip |
progressbar unit tests: split tests into individual files
Diffstat (limited to 'tests/unit/progressbar/progressbar.js')
-rw-r--r-- | tests/unit/progressbar/progressbar.js | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/tests/unit/progressbar/progressbar.js b/tests/unit/progressbar/progressbar.js deleted file mode 100644 index 087106510..000000000 --- a/tests/unit/progressbar/progressbar.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * progressbar unit tests - */ -(function($) { -// -// Progressbar Test Helper Functions -// - -var defaults = { - disabled: false, - value: 0 -}; - -var el; - -// Progressbar Tests -module("progressbar"); - -test("init", function() { - expect(1); - - $("<div></div>").appendTo('body').progressbar().remove(); - ok(true, '.progressbar() called on element'); - -}); - -test("destroy", function() { - expect(1); - - $("<div></div>").appendTo('body').progressbar().progressbar("destroy").remove(); - ok(true, '.progressbar("destroy") called on element'); - -}); - -test("defaults", function() { - el = $('<div></div>').progressbar(); - $.each(defaults, function(key, val) { - var actual = el.data(key + ".progressbar"), expected = val; - same(actual, expected, key); - }); - el.remove(); -}); - -test("set defaults on init", function() { - el = $("#progressbar").progressbar({ - value: 50 - }); - - equals(el.progressbar("option", "value"), 50, "value"); -}); - -test("accessibility", function() { - expect(7); - el = $("#progressbar").progressbar(); - - equals(el.attr("role"), "progressbar", "aria role"); - equals(el.attr("aria-valuemin"), 0, "aria-valuemin"); - equals(el.attr("aria-valuemax"), 100, "aria-valuemax"); - equals(el.attr("aria-valuenow"), 0, "aria-valuenow initially"); - el.progressbar("value", 77); - equals(el.attr("aria-valuenow"), 77, "aria-valuenow"); - el.progressbar("disable"); - equals(el.attr("aria-disabled"), "true", "aria-disabled"); - el.progressbar("enable"); - equals(el.attr("aria-disabled"), "false", "enabled"); -}); - -})(jQuery); |