aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-12-27 12:50:04 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-12-27 12:50:04 +0100
commit04d668b7171e14292af9f4de1b6bfbbe1a6e990c (patch)
treef7578b7c5d17b9d8c75ff4dfa3b001dcd0f162bd /tests
parent0d4022bceb33fb95c41fab768c1829d464861899 (diff)
downloadjquery-ui-04d668b7171e14292af9f4de1b6bfbbe1a6e990c.tar.gz
jquery-ui-04d668b7171e14292af9f4de1b6bfbbe1a6e990c.zip
Spinner: Update button icons when option changes. Fixes #8926 - Spinner: Can't change icons option after init
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/spinner/spinner_options.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/unit/spinner/spinner_options.js b/tests/unit/spinner/spinner_options.js
index 284e03a3e..6f3650f92 100644
--- a/tests/unit/spinner/spinner_options.js
+++ b/tests/unit/spinner/spinner_options.js
@@ -5,10 +5,17 @@ module( "spinner: options" );
// culture is tested after numberFormat, since it depends on numberFormat
test( "icons: default ", function() {
- expect( 2 );
- var element = $( "#spin" ).val( 0 ).spinner().spinner( "widget" );
- equal( element.find( ".ui-icon:first" ).attr( "class" ), "ui-icon ui-icon-triangle-1-n" );
- equal( element.find( ".ui-icon:last" ).attr( "class" ), "ui-icon ui-icon-triangle-1-s" );
+ expect( 4 );
+ var element = $( "#spin" ).val( 0 ).spinner();
+ equal( element.spinner( "widget" ).find( ".ui-icon:first" ).attr( "class" ), "ui-icon ui-icon-triangle-1-n" );
+ equal( element.spinner( "widget" ).find( ".ui-icon:last" ).attr( "class" ), "ui-icon ui-icon-triangle-1-s" );
+
+ element.spinner( "option", "icons", {
+ up: "ui-icon-carat-1-n",
+ down: "ui-icon-carat-1-s"
+ });
+ equal( element.spinner( "widget" ).find( ".ui-icon:first" ).attr( "class" ), "ui-icon ui-icon-carat-1-n" );
+ equal( element.spinner( "widget" ).find( ".ui-icon:last" ).attr( "class" ), "ui-icon ui-icon-carat-1-s" );
});
test( "icons: custom ", function() {