2 * mobile dialog unit tests
5 module('jquery.mobile.fieldContain.js');
7 test( "Field container contains appropriate css styles", function(){
8 ok($('#test-fieldcontain').hasClass('ui-field-contain ui-body ui-br'), 'A fieldcontain element must contain styles "ui-field-contain ui-body ui-br"');
11 test( "Field container will create when inside a container that receives a 'create' event", function(){
12 ok( !$("#enhancetest").appendTo(".ui-page-active").find(".ui-field-contain").length, "did not have enhancements applied" );
13 ok( $("#enhancetest").trigger("create").find(".ui-field-contain").length, "enhancements applied" );
16 test( "field containers inside ignore container should not be enhanced", function() {
17 var $ignored = $( "#ignored-fieldcontain" ), $enhanced = $( "#enhanced-fieldcontain" );
19 $.mobile.ignoreContentEnabled = true;
21 $( "#ignore-container-tests" ).trigger( "create" );
23 same( $ignored.attr( "class" ), undefined, "ignored div does not have field contain class" );
24 ok( $enhanced.hasClass( "ui-field-contain" ), "enhanced div has field contain class" );
26 $.mobile.ignoreContentEnabled = false;