All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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 + ''; for (i=0;i"; } detailhtml = detailhtml + "
" + detailJSON.children[i].description + "
"; } $("#feature-detail").html(detailhtml); // get the offset of where we should be? var topOffsetShouldbe = $("#detail-div-container").offset().top; // get the offset of the affixed div var affixOffset = $("#affix-marker").offset().top; // so the absolute position position, relative to the parent should be affixOffset - topOffsetShouldbe var absPosition = affixOffset - topOffsetShouldbe; if (absPosition < 0){ absPosition = 0; } $("#feature-detail").css("top", absPosition + 'px'); $('[data-spy="affix"]').each(function () { $(this).affix('refresh'); }); } }; jQuery("#feature-tree").jstree({ "json_data":{ "data":treeData, "progressive_render":true }, "plugins":[ "themes", "json_data", "ui" ] }) .delegate("a", "click", treeClick); });




© 2015 - 2024 Weber Informatics LLC | Privacy Policy