Merge branch 'master' into PROT-9-webservice
[proteocache.git] / webapp / resources / datatables-1.9.4 / media / unit_testing / tests_onhold / 1_dom / bJQueryUI.js
diff --git a/webapp/resources/datatables-1.9.4/media/unit_testing/tests_onhold/1_dom/bJQueryUI.js b/webapp/resources/datatables-1.9.4/media/unit_testing/tests_onhold/1_dom/bJQueryUI.js
new file mode 100755 (executable)
index 0000000..6c68546
--- /dev/null
@@ -0,0 +1,40 @@
+// DATA_TEMPLATE: dom_data
+oTest.fnStart( "bJQueryUI" );
+
+$(document).ready( function () {
+       $('#example').dataTable( {
+               "bJQueryUI": true
+       } );
+       
+       oTest.fnTest( 
+               "Header elements are fully wrapped by DIVs",
+               null,
+               function () {
+                       var test = true;
+                       $('#example thead th').each( function () {
+                               if ( this.childNodes > 1 ) {
+                                       test = false;
+                               }
+                       } );
+                       return test;
+               }
+       );
+       
+       oTest.fnTest( 
+               "One div for each header element",
+               null,
+               function () {
+                       return $('#example thead th div').length == 5;
+               }
+       );
+       
+       oTest.fnTest( 
+               "One span for each header element, nested as child of div",
+               null,
+               function () {
+                       return $('#example thead th div>span').length == 5;
+               }
+       );
+       
+       oTest.fnComplete();
+} );
\ No newline at end of file