static.js.substeps.js Maven / Gradle / Ivy
// image variables used in the tree
var imgP = "img/PASSED.png";
var imgNR = "img/NOT_RUN.png";
var imgPF = "img/PARSE_FAILURE.png";
var imgF = "img/FAILED.png";
$(document).ready(function() {
$('#feature-stats-div').html( '
' );
$('#feature-stats-table').dataTable( {
"bPaginate": true,
"bFilter": false,
"bSort": true,
"aaSorting": [[ 4, "desc" ]],
"aaData": featureStatsData,
"fnCreatedRow": function( nRow, aData, iDisplayIndex ) {
/* Append the grade to the default row class name */
if ( aData[4] > "0" )
{
$(nRow).addClass( "error_row");
}
return nRow;
},
"aoColumns": [
{ "sTitle": "Tag" },
{ "sTitle": "Features" },
{ "sTitle": "Features run" },
{ "sTitle": "Features passed" },
{ "sTitle": "Features failed" },
{ "sTitle": "Features success" }
],
"aoColumnDefs": [
{
"fnRender": function ( oObj ) {
return oObj.aData[5] +' %';
},
"aTargets": [ 5 ]
}]
} );
$('#scenario-stats-div').html( '
' );
$('#scenario-stats-table').dataTable( {
"bPaginate": true,
"bFilter": false,
"bSort": true,
"aaSorting": [[ 4, "desc" ]],
"aaData": scenarioStatsData,
"fnCreatedRow": function( nRow, aData, iDisplayIndex ) {
/* Append the grade to the default row class name */
if ( aData[4] > "0" )
{
$(nRow).addClass( "error_row");
}
return nRow;
},
"aoColumns": [
{ "sTitle": "Tag" },
{ "sTitle": "Scenarios" },
{ "sTitle": "Scenarios run" },
{ "sTitle": "Scenarios passed" },
{ "sTitle": "Scenarios failed" },
{ "sTitle": "Scenarios success" }
],
"aoColumnDefs": [
{
"fnRender": function ( oObj ) {
return oObj.aData[5] +' %';
},
"aTargets": [ 5 ]
}]
} );
var treeClick = function (event) {
event.preventDefault();
var id = jQuery(this).attr("id");
var detailJSON = detail[id];
if (detailJSON ) {
var detailhtml = "" + detailJSON.result +"
"
if (detailJSON.filename.length >0){
detailhtml += "File: " + detailJSON.filename + "
";
}
detailhtml += "" + detailJSON.nodetype + ": " + detailJSON.description + "
";
if (detailJSON.method.length > 0){
detailhtml = detailhtml + "Method: " + detailJSON.method + "
";
}
if (detailJSON.emessage.length > 0){
detailhtml = detailhtml + "" + detailJSON.emessage + "
" +
detailJSON.stacktrace + "
";
}
detailhtml = detailhtml + "Duration: " + detailJSON.runningDurationString + "
" if (detailJSON.children.length > 0){ detailhtml = detailhtml + '" + detailJSON.children[i].description + " | "; } detailhtml = detailhtml + "