aboutsummaryrefslogtreecommitdiffstats
path: root/tests/progressbar.js
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2008-11-24 13:52:13 +0000
committerRichard Worth <rdworth@gmail.com>2008-11-24 13:52:13 +0000
commit0ef9a8ac3dd1d3f1e98012c9744ae98770da4272 (patch)
tree8b2520aa3c69047adb52b019ebafc41fb24f317c /tests/progressbar.js
parent19a7d6bc5bceb82892b063f678740ae09b630973 (diff)
downloadjquery-ui-0ef9a8ac3dd1d3f1e98012c9744ae98770da4272.tar.gz
jquery-ui-0ef9a8ac3dd1d3f1e98012c9744ae98770da4272.zip
progressbar tests: started refactor
Diffstat (limited to 'tests/progressbar.js')
-rw-r--r--tests/progressbar.js31
1 files changed, 15 insertions, 16 deletions
diff --git a/tests/progressbar.js b/tests/progressbar.js
index 77b69943e..46b3a2bf7 100644
--- a/tests/progressbar.js
+++ b/tests/progressbar.js
@@ -8,10 +8,10 @@
var defaults = {
disabled: false,
- duration: 1000,
- increment: 1,
- interval: 1000,
- range: true,
+ height: 20,
+ label: true,
+ labelAlign: 'left',
+ value: 0,
width: 300
};
@@ -46,20 +46,19 @@ test("defaults", function() {
});
test("set defaults on init", function() {
- expect(5);
el = $("#progressbar").progressbar({
- width: 500,
- duration: 5000,
- interval: 500,
- increment: 5,
- range: false
+ height: 30,
+ label: false,
+ labelAlign: 'right',
+ value: 50,
+ width: 200
});
- equals(el.data("width.progressbar"), 500, "width");
- equals(el.data("duration.progressbar"), 5000, "duration");
- equals(el.data("interval.progressbar"), 500, "interval");
- equals(el.data("increment.progressbar"), 5, "increment");
- equals(el.data("range.progressbar"), false, "range");
+ equals(el.progressbar("option", "height"), 30, "height");
+ equals(el.progressbar("option", "label"), false, "label");
+ equals(el.progressbar("option", "labelAlign"), "right", "labelAlign");
+ equals(el.progressbar("option", "value"), 50, "value");
+ equals(el.progressbar("option", "width"), 200, "width");
});
@@ -71,7 +70,7 @@ test("accessibility", function() {
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("progress", 77);
+ el.progressbar("value", 77);
equals(el.attr("aria-valuenow"), 77, "aria-valuenow");
el.progressbar("disable");
equals(el.attr("aria-disabled"), "true", "aria-disabled");