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

Contents of /misc/horsensspejder-web/jquery/DataTables-1.9.4/media/unit_testing/tests_onhold/1_dom/oLanguage.sZeroRecords.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, 3 months ago) by torben
File MIME type: application/javascript
File size: 1182 byte(s)
initial import
1 // DATA_TEMPLATE: dom_data
2 oTest.fnStart( "oLanguage.sZeroRecords" );
3
4 $(document).ready( function () {
5 /* Check the default */
6 var oTable = $('#example').dataTable();
7 var oSettings = oTable.fnSettings();
8
9 oTest.fnTest(
10 "Zero records language is 'No matching records found' by default",
11 null,
12 function () { return oSettings.oLanguage.sZeroRecords == "No matching records found"; }
13 );
14
15 oTest.fnTest(
16 "Text is shown when empty table (after filtering)",
17 function () { oTable.fnFilter('nothinghere'); },
18 function () { return $('#example tbody tr td')[0].innerHTML == "No matching records found" }
19 );
20
21
22
23 oTest.fnTest(
24 "Zero records language can be defined",
25 function () {
26 oSession.fnRestore();
27 oTable = $('#example').dataTable( {
28 "oLanguage": {
29 "sZeroRecords": "unit test"
30 }
31 } );
32 oSettings = oTable.fnSettings();
33 },
34 function () { return oSettings.oLanguage.sZeroRecords == "unit test"; }
35 );
36
37 oTest.fnTest(
38 "Text is shown when empty table (after filtering)",
39 function () { oTable.fnFilter('nothinghere2'); },
40 function () { return $('#example tbody tr td')[0].innerHTML == "unit test" }
41 );
42
43
44 oTest.fnComplete();
45 } );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20