/[projects]/misc/horsensspejder-web/jquery/DataTables-1.9.4/media/unit_testing/tests_onhold/1_dom/2608.js
ViewVC logotype

Contents of /misc/horsensspejder-web/jquery/DataTables-1.9.4/media/unit_testing/tests_onhold/1_dom/2608.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2125 - (show annotations) (download) (as text)
Wed Mar 12 19:30:05 2014 UTC (10 years, 2 months ago) by torben
File MIME type: application/javascript
File size: 1277 byte(s)
initial import
1 // DATA_TEMPLATE: dom_data
2 oTest.fnStart( "2608 - State saving escaping filters" );
3
4 $(document).ready( function () {
5 $('#example').dataTable( {
6 "bStateSave": true
7 } );
8
9 oTest.fnTest(
10 "Set the filter",
11 function () {
12 $('#example_filter input').val( '\\s*CVM\\s*$' );
13 $('#example_filter input').keyup();
14 },
15 function () { return $('#example_filter input').val() == '\\s*CVM\\s*$'; }
16 );
17
18 oTest.fnTest(
19 "Destroy the table and remake it - checking the filter was saved",
20 function () {
21 $('#example').dataTable( {
22 "bStateSave": true,
23 "bDestroy": true
24 } );
25 },
26 function () { return $('#example_filter input').val() == '\\s*CVM\\s*$'; }
27 );
28
29 oTest.fnTest(
30 "Do it again without state saving and make sure filter is empty",
31 function () {
32 $('#example').dataTable( {
33 "bDestroy": true
34 } );
35 },
36 function () { return $('#example_filter input').val() == ''; }
37 );
38
39 oTest.fnTest(
40 "Clean up",
41 function () {
42 $('#example').dataTable( {
43 "bStateSave": true,
44 "bDestroy": true
45 } );
46 $('#example_filter input').val( '' );
47 $('#example_filter input').keyup();
48 },
49 function () { return $('#example_filter input').val() == ''; }
50 );
51
52 oTest.fnCookieDestroy( $('#example').dataTable() );
53 oTest.fnComplete();
54 } );

  ViewVC Help
Powered by ViewVC 1.1.20