Add datatables-1.9.4 and jquery-1.10.2 libraries
[proteocache.git] / webapp / resources / datatables-1.9.4 / media / unit_testing / tests_onhold / 4_server-side / 2600.js
1 // DATA_TEMPLATE: empty_table
2 oTest.fnStart( "2600 - Display rewind when changing length" );
3
4 $(document).ready( function () {
5         $('#example').dataTable( {
6                 "bServerSide": true,
7                 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php"
8         } );
9         
10         oTest.fnWaitTest( 
11                 "Info correct on init",
12                 null,
13                 function () { return $('#example_info').html() == "Showing 1 to 10 of 57 entries"; }
14         );
15         
16         oTest.fnWaitTest( 
17                 "Page 2",
18                 function () { $('#example_next').click(); },
19                 function () { return $('#example_info').html() == "Showing 11 to 20 of 57 entries"; }
20         );
21         
22         oTest.fnWaitTest( 
23                 "Page 3",
24                 function () { $('#example_next').click(); },
25                 function () { return $('#example_info').html() == "Showing 21 to 30 of 57 entries"; }
26         );
27         
28         oTest.fnWaitTest( 
29                 "Page 4",
30                 function () { $('#example_next').click(); },
31                 function () { return $('#example_info').html() == "Showing 31 to 40 of 57 entries"; }
32         );
33         
34         oTest.fnWaitTest( 
35                 "Page 5",
36                 function () { $('#example_next').click(); },
37                 function () { return $('#example_info').html() == "Showing 41 to 50 of 57 entries"; }
38         );
39         
40         oTest.fnWaitTest( 
41                 "Rewind",
42                 function () { $('#example_length select').val('100'); $('#example_length select').change(); },
43                 function () { return $('#example_info').html() == "Showing 1 to 57 of 57 entries"; }
44         );
45         
46         oTest.fnComplete();
47 } );