diff --git a/js/widgets/forms/checkboxradio.js b/js/widgets/forms/checkboxradio.js index b6c9d9c2111..48d061eb79d 100644 --- a/js/widgets/forms/checkboxradio.js +++ b/js/widgets/forms/checkboxradio.js @@ -10,6 +10,7 @@ //>>css.theme: ../css/themes/default/jquery.mobile.theme.css define( [ "jquery", + "../../vmouse", "../../navigation/path", "../../jquery.mobile.core", "../../jquery.mobile.widget", diff --git a/tests/unit/individual-modules/checkboxradio-tests.html b/tests/unit/individual-modules/checkboxradio-tests.html new file mode 100644 index 00000000000..a8386e7cfd8 --- /dev/null +++ b/tests/unit/individual-modules/checkboxradio-tests.html @@ -0,0 +1,36 @@ + + + + + + jQuery Mobile Collapsible Test Suite + + + + + + + + + + + + + + + + +
+ + + + diff --git a/tests/unit/individual-modules/checkboxradio_core.js b/tests/unit/individual-modules/checkboxradio_core.js new file mode 100644 index 00000000000..ba79749e48e --- /dev/null +++ b/tests/unit/individual-modules/checkboxradio_core.js @@ -0,0 +1,14 @@ +test( "Checkboxradio widget works correctly", function() { + var checkbox = $( "#the-checkbox" ).checkboxradio(), + initiallyChecked = checkbox.prop( "checked" ); + + deepEqual( checkbox.parent().hasClass( "ui-checkbox" ), true, + "Wrapper has class ui-checkbox" ); + deepEqual( checkbox.siblings( "label" ).hasClass( "ui-btn" ), true, + "Input has a sibling