Server IP : 92.204.138.22 / Your IP : 18.223.195.70 Web Server : Apache System : Linux ns1009439.ip-92-204-138.us 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64 User : internationaljou ( 1019) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/internationaljou/SSRG-01-03-2024/admin/bower_components/datatables/media/unit_testing/tests_onhold/6_delayed_rendering/ |
Upload File : |
// DATA_TEMPLATE: empty_table oTest.fnStart( "aoColumns.sTitle" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt", "bDeferRender": true } ); var oSettings = oTable.fnSettings(); oTest.fnWaitTest( "If not given, then the columns titles are empty", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Browser" && jqNodes[2].innerHTML == "Platform(s)" && jqNodes[3].innerHTML == "Engine version" && jqNodes[4].innerHTML == "CSS grade"; return bReturn; } ); oTest.fnWaitTest( "Can set a single column title - and others are read from DOM", function () { oSession.fnRestore(); $('#example').dataTable( { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt", "bDeferRender": true, "aoColumns": [ null, { "sTitle": 'unit test' }, null, null, null ] } ); }, function () { var jqNodes = $('#example thead tr:eq(0) th'); var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "unit test" && jqNodes[2].innerHTML == "Platform(s)" && jqNodes[3].innerHTML == "Engine version" && jqNodes[4].innerHTML == "CSS grade"; return bReturn; } ); oTest.fnWaitTest( "Can set multiple column titles", function () { oSession.fnRestore(); $('#example').dataTable( { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt", "bDeferRender": true, "aoColumns": [ null, { "sTitle": 'unit test 1' }, null, null, { "sTitle": 'unit test 2' } ] } ); }, function () { var jqNodes = $('#example thead tr:eq(0) th'); var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "unit test 1" && jqNodes[2].innerHTML == "Platform(s)" && jqNodes[3].innerHTML == "Engine version" && jqNodes[4].innerHTML == "unit test 2"; return bReturn; } ); oTest.fnComplete(); } );