remove datatable unit tests
[contractdashboard.git] / media / 2569.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// DATA_TEMPLATE: dom_data
oTest.fnStart( "Destroy with hidden columns" );
 
$(document).ready( function () {
        $('#example').dataTable( {
                "aoColumnDefs": [ 
                        { "bSearchable": false, "bVisible": false, "aTargets": [ 2 ] },
                        { "bVisible": false, "aTargets": [ 3 ] }
                ]
        } );
        $('#example').dataTable().fnDestroy();
        
        oTest.fnTest( 
                "Check that the number of columns in table is correct",
                null,
                function () { return $('#example tbody tr:eq(0) td').length == 5; }
        );
        
        
        oTest.fnTest( 
                "And with scrolling",
                function () {
                        $('#example').dataTable( {
                                "sScrollY": 200,
                                "aoColumnDefs": [ 
                                        { "bSearchable": false, "bVisible": false, "aTargets": [ 2 ] },
                                        { "bVisible": false, "aTargets": [ 3 ] }
                                ]
                        } );
                        $('#example').dataTable().fnDestroy();
                },
                function () { return $('#example tbody tr:eq(0) td').length == 5; }
        );
        
        oTest.fnComplete();
} );