2 * mobile select unit tests
6 var libName = "jquery.mobile.forms.select";
8 $(document).bind('mobileinit', function(){
9 $.mobile.selectmenu.prototype.options.nativeMenu = false;
14 $.testHelper.openPage( location.hash.indexOf("#default") >= 0 ? "#" : "#default" );
18 test( "selects marked with data-native-menu=true should use a div as their button", function(){
19 same($("#select-choice-native-container div.ui-btn").length, 1);
22 test( "selects marked with data-native-menu=true should not have a custom menu", function(){
23 same($("#select-choice-native-container ul").length, 0);
26 test( "selects marked with data-native-menu=true should sit inside the button", function(){
27 same($("#select-choice-native-container div.ui-btn select").length, 1);
30 test( "select controls will create when inside a container that receives a 'create' event", function(){
31 ok( !$("#enhancetest").appendTo(".ui-page-active").find(".ui-select").length, "did not have enhancements applied" );
32 ok( $("#enhancetest").trigger("create").find(".ui-select").length, "enhancements applied" );