aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/slider/slider_options.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2014-06-11 09:28:39 -0400
committerScott González <scott.gonzalez@gmail.com>2014-07-02 17:17:05 -0400
commit15baf024c3352f0c593a49d70a3a87e4bc13c36b (patch)
treea07b7b0c185af407dabd69fe6b004aba545d1ec4 /tests/unit/slider/slider_options.js
parent7c4c86a000d1daf8181583a9902fed7008a4190e (diff)
downloadjquery-ui-15baf024c3352f0c593a49d70a3a87e4bc13c36b.tar.gz
jquery-ui-15baf024c3352f0c593a49d70a3a87e4bc13c36b.zip
Slider: Reset positioning when orientation changes
Fixes #10105 Closes gh-1268
Diffstat (limited to 'tests/unit/slider/slider_options.js')
-rw-r--r--tests/unit/slider/slider_options.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/unit/slider/slider_options.js b/tests/unit/slider/slider_options.js
index 5cfb5351a..587f847cf 100644
--- a/tests/unit/slider/slider_options.js
+++ b/tests/unit/slider/slider_options.js
@@ -78,7 +78,7 @@ test( "min", function() {
});
test( "orientation", function() {
- expect( 6 );
+ expect( 8 );
element = $( "#slider1" );
options = {
@@ -93,6 +93,7 @@ test( "orientation", function() {
element.slider( options ).slider( "option", "orientation", "horizontal" );
ok( element.is( ".ui-slider-horizontal" ), "horizontal slider has class .ui-slider-horizontal" );
ok( !element.is( ".ui-slider-vertical" ), "horizontal slider does not have class .ui-slider-vertical" );
+ equal( element.find( ".ui-slider-handle" )[ 0 ].style.bottom, "", "CSS bottom reset" );
equal( handle()[0].style.left, percentVal + "%", "horizontal slider handle is positioned with left: %" );
element.slider( "destroy" ) ;
@@ -109,6 +110,7 @@ test( "orientation", function() {
element.slider( options ).slider( "option", "orientation", "vertical" );
ok( element.is( ".ui-slider-vertical" ), "vertical slider has class .ui-slider-vertical" );
ok( !element.is( ".ui-slider-horizontal" ), "vertical slider does not have class .ui-slider-horizontal" );
+ equal( element.find( ".ui-slider-handle" )[ 0 ].style.left, "", "CSS left reset" );
equal( handle()[0].style.bottom, percentVal + "%", "vertical slider handle is positioned with bottom: %" );
element.slider( "destroy" );