1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-12-02 14:24:11 +01:00
DataTables/media/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sProcessing.js

51 lines
1.3 KiB
JavaScript

// DATA_TEMPLATE: empty_table
oTest.fnStart( "oLanguage.sProcessing" );
$(document).ready( function () {
/* Check the default */
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
"bDeferRender": true,
"bProcessing": true
} );
var oSettings = oTable.fnSettings();
oTest.fnWaitTest(
"Processing language is 'Processing...' by default",
null,
function () { return oSettings.oLanguage.sProcessing == "Processing..."; }
);
oTest.fnTest(
"Processing language default is in the DOM",
null,
function () { return document.getElementById('example_processing').innerHTML = "Processing..."; }
);
oTest.fnWaitTest(
"Processing language can be defined",
function () {
oSession.fnRestore();
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
"bDeferRender": true,
"bProcessing": true,
"oLanguage": {
"sProcessing": "unit test"
}
} );
oSettings = oTable.fnSettings();
},
function () { return oSettings.oLanguage.sProcessing == "unit test"; }
);
oTest.fnTest(
"Processing language definition is in the DOM",
null,
function () { return document.getElementById('example_processing').innerHTML = "unit test"; }
);
oTest.fnComplete();
} );