mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Slider: Verify value constraint with a max that is a step mismatch
Ref #10078
Closes gh-1485
(cherry picked from commit 21831f5036
)
This commit is contained in:
parent
b2aa641c04
commit
d86df4b697
@ -62,7 +62,7 @@ test( "disable", function() {
|
||||
});
|
||||
|
||||
test( "value", function() {
|
||||
expect( 18 );
|
||||
expect( 19 );
|
||||
$( [ false, "min", "max" ] ).each(function() {
|
||||
var element = $( "<div></div>" ).slider({
|
||||
range: this,
|
||||
@ -98,6 +98,16 @@ test( "value", function() {
|
||||
});
|
||||
element.slider( "option", "value", 2.4 );
|
||||
equal( element.slider( "value" ), 2.4, "value is set to max with 0.01 step" );
|
||||
|
||||
element = $( "<div></div>" ).slider({
|
||||
value: 100,
|
||||
min: 10,
|
||||
max: 500,
|
||||
step: 50
|
||||
});
|
||||
|
||||
element.slider( "option", "value", 510 );
|
||||
equal( element.slider( "value" ), 460, "value is restricted to maximum valid step" );
|
||||
});
|
||||
|
||||
//test( "values", function() {
|
||||
|
Loading…
Reference in New Issue
Block a user