diff --git a/tests/unit/button/button_core.js b/tests/unit/button/button_core.js new file mode 100644 index 00000000..7775e12e --- /dev/null +++ b/tests/unit/button/button_core.js @@ -0,0 +1,14 @@ +/* + * mobile button unit tests + */ +(function($){ + $.mobile.page.prototype.options.keepNative = "button.should-be-native"; + + test( "button elements in the keepNative set shouldn't be enhanced", function() { + same( $("button.should-be-native").siblings("div.ui-slider").length, 0 ); + }); + + test( "button elements should be enhanced", function() { + ok( $("#enhanced").hasClass( "ui-btn-hidden" ) ); + }); +})( jQuery ); \ No newline at end of file diff --git a/tests/unit/button/index.html b/tests/unit/button/index.html new file mode 100644 index 00000000..a1fc329c --- /dev/null +++ b/tests/unit/button/index.html @@ -0,0 +1,36 @@ + + + + + + jQuery Mobile Button Test Suite + + + + + + + + + + + + + + + + +

jQuery Mobile Button Test Suite

+

+

+
    +
+ +
+
+ + +
+
+ +