static.js.substeps.js Maven / Gradle / Ivy
$(document).ready(function() {
// cellpadding="0" cellspacing="0" border="0"
$('#feature-stats-div').html('
');
$('#feature-stats-table').DataTable({
paging: false,
searching: false,
"data": featureStatsData,
"columns": [
{data: 'tag', title: "Tag"},
{data: 'total', title: "total"},
{data: 'run', title: "run"},
{data: 'passed', title: "passed"},
{data: 'failedPC', title: "failed"},
{data: 'successPC', title: "success"}
],
"columnDefs": [
{
// The `data` parameter refers to the data for the cell (defined by the
// `data` option, which defaults to the column being worked with, in
// this case `data: 0`.
"render": function (data, type, row) {
return data + ' %';
},
"targets": [4, 5]
}
]
});
$('#scenario-stats-div').html('
');
$('#scenario-stats-table').DataTable({
paging: false,
searching: false,
"data": scenarioStatsData,
"columns": [
{data: 'tag', title: "Tag"},
{data: 'total', title: "total"},
{data: 'run', title: "run"},
{data: 'passed', title: "passed"},
{data: 'failedPC', title: "failed"},
{data: 'successPC', title: "success"}
],
"columnDefs": [
{
"render": function (data, type, row) {
return data + ' %';
},
"targets": [4, 5]
}
]
});
});
$(document).ready(function() {
$("#feature-tree").jstree({
"core":{
"data":treeData,
"progressive_render":true,
"themes" : {
"dots" : true,
"icons" : true
},
"multiple" : false
}
});
$("#hide-not-run-chk").bind("click", function(event){
var result = document.evaluate('//li[a/i[contains(@class, "NOT_RUN")]]', document.documentElement, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)
for (var i = 0; i < result.snapshotLength; i++) {
if (event.target.checked) {
result.snapshotItem(i).style.display = 'none'
}
else {
result.snapshotItem(i).style.display = 'block'
}
}
});
});
function formatStackElement(item, index){
return "" + item + " "
}
function toggle(id){
elem = document.getElementById(id);
if (elem.style.display == 'none') {
elem.style.display = 'block';
} else {
elem.style.display = 'none';
}
}
$(function () {
$('#feature-tree')
.on('select_node.jstree', function (e, data) {
// console.log("selected!: " + data.selected + " " + data.node.text);
var id = data.node.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 > 0){
detailhtml = detailhtml + "Method: " + detailJSON.method + "
";
}
if(detailJSON.screenshot) {
detailhtml = detailhtml + "";
}
if (detailJSON.emessage != null && detailJSON.emessage.length > 0){
detailhtml = detailhtml + "
" + detailJSON.emessage + "
" +
detailJSON.stacktrace.map(formatStackElement).join('') + "
";
}
detailhtml = detailhtml + "Duration: " + detailJSON.runningDurationString + "
" if (detailJSON.children && detailJSON.children.length > 0){ detailhtml = detailhtml + '" + detailJSON.children[i].description + " | "; } detailhtml = detailhtml + "