diff options
author | Chi Cheng <cloudream@gmail.com> | 2008-08-19 08:56:48 +0000 |
---|---|---|
committer | Chi Cheng <cloudream@gmail.com> | 2008-08-19 08:56:48 +0000 |
commit | 1de76c6f779a9939a9114f56018e6d52846157e0 (patch) | |
tree | ba88cc117886466484b8d5d9b04cb64edfe21abf | |
parent | 9da87e28e68659186c7cba32ce864c5dc0861d11 (diff) | |
download | jquery-ui-1de76c6f779a9939a9114f56018e6d52846157e0.tar.gz jquery-ui-1de76c6f779a9939a9114f56018e6d52846157e0.zip |
Spinner test: a bug when set stepping:0.3
-rw-r--r-- | tests/spinner.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/spinner.js b/tests/spinner.js index 3447004a9..a09588ff7 100644 --- a/tests/spinner.js +++ b/tests/spinner.js @@ -139,16 +139,16 @@ test("keydown on input with options", function() { });
test("currency and decimal options", function() {
- expect(4);
+ expect(5);
- el = $("#spin").spinner({ currency:"$", incremental:false, max:120, min:-50, stepping:0.15 });
+ el = $("#spin").spinner({ currency:"$", incremental:false, max:120, min:-50, stepping:0.3 });
equals(el.val(), "$0.00", "start number");
el.simulate("keydown",{keyCode:$.simulate.VK_UP})
.simulate("keyup",{keyCode:$.simulate.VK_UP});
- equals(el.val(), "$0.15", "Stepping 0.15");
+ equals(el.val(), "$0.30", "Stepping 0.30");
el.simulate("keydown",{keyCode:$.simulate.VK_END})
.simulate("keyup",{keyCode:$.simulate.VK_END});
@@ -160,6 +160,14 @@ test("currency and decimal options", function() { equals(el.val(), "-$50.00", "Home key to min");
+ for ( var i = 1 ; i<=120 ; i++ ) {
+ el.simulate("keydown",{keyCode:$.simulate.VK_UP});
+ }
+
+ el.simulate("keyup",{keyCode:$.simulate.VK_UP});
+
+ equals(el.val(), "-$14.00", "keydown 120 times");
+
});
|