Debian Codegraph @

old-tests/tests_onhold/1_dom/bJQueryUI.js

raw
1 // DATA_TEMPLATE: dom_data
2 oTest.fnStart( "bJQueryUI" );
3
4 $(document).ready( function () {
5 $('#example').dataTable( {
6 "bJQueryUI": true
7 } );
8
9 oTest.fnTest(
10 "Header elements are fully wrapped by DIVs",
11 null,
12 function () {
13 var test = true;
14 $('#example thead th').each( function () {
15 if ( this.childNodes > 1 ) {
16 test = false;
17 }
18 } );
19 return test;
20 }
21 );
22
23 oTest.fnTest(
24 "One div for each header element",
25 null,
26 function () {
27 return $('#example thead th div').length == 5;
28 }
29 );
30
31 oTest.fnTest(
32 "One span for each header element, nested as child of div",
33 null,
34 function () {
35 return $('#example thead th div>span').length == 5;
36 }
37 );
38
39 oTest.fnComplete();
40 } );