Server IP : 92.204.138.22 / Your IP : 3.128.205.155 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/ |
Upload File : |
var giTotalTestCount = 0; var giActiveModule = 0; var giModuleTests; var giStartTime; var giTest; var gbStop = false; var gtoTest; function fnTestStart ( sTestInfo ) { gaoTest[ giActiveModule ].iTests++; document.getElementById('test_info').innerHTML += (giActiveModule+1)+'.'+(giModuleTests+1)+'. '+sTestInfo+'... '; document.getElementById('test_number').innerHTML = giTotalTestCount+1; giModuleTests++; giTotalTestCount++; /* Set a timer to catch stalled script */ gtoTest = setTimeout( function () { fnMessage( '<span class="error">WARNING - test script stalled. Likely a JS error</span>' ); gbStop = true; }, 3000 ); } function fnTestResult ( bResult ) { clearTimeout( gtoTest ); if ( bResult ) { fnMessage( 'Passed' ); } else { fnMessage( '<span class="error">FAILED</span>' ); gbStop = true; fnEnd( false ); } } function fnUnitStart( iTest ) { if ( !gbStop ) { giModuleTests = 0; window.parent.test_arena.location.href = (iTest==0?"":"../")+'templates/'+gaoTest[iTest].sTemplate+'.php?scripts='+gaoTest[iTest].sTest; giTest = iTest; } } function fnStartMessage( sMessage ) { fnMessage( '<br><b>'+gaoTest[giTest].sGroup+' - '+sMessage+'</b>' ); } function fnMessage( sMessage ) { var nInfo = document.getElementById('test_info'); nInfo.innerHTML += sMessage+'<br>'; nInfo.scrollTop = nInfo.scrollHeight; } function fnUnitComplete() { if ( giActiveModule < gaoTest.length - 1 ) { fnUnitStart( ++giActiveModule ); } else { fnEnd( true ); } } function fnEnd( bSuccess ) { var iEndTime = new Date().getTime(); var sTime = '<br>This test run took '+parseInt((iEndTime-giStartTime)/1000, 10)+ ' second(s) to complete.'; if ( bSuccess ) { $('#test_running').html( 'Tests complete. '+giTotalTestCount+' tests were run.'+sTime ); } else { $('#test_running').html( 'Unit tests failed at test '+giTotalTestCount+'.'+sTime ); } } $(document).ready( function () { giStartTime = new Date().getTime(); fnUnitStart( giActiveModule ); } );