mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Spinner test: a bug when set stepping:0.3
This commit is contained in:
parent
9da87e28e6
commit
1de76c6f77
@ -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");
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user