var app = angular.module("TreeTestReportApp", ['treeGrid', 'ui.bootstrap', 'angular-clipboard']) .directive('selectOnClick', ['$window', function ($window) { return { link: function (scope, element) { element.on('click', function () { var selection = $window.getSelection(); var range = document.createRange(); range.selectNodeContents(element[0]); selection.removeAllRanges(); selection.addRange(range); }); } }; }]) .directive('preEx', function () { return { restrict: 'E', replace: true, transclude: true, scope: { title: '@', text: '=', textArray: '=', }, template: "
", link: function (scope, elm, attrs, ctrl) { if (!scope.text && !scope.textArray) { console.log('No data was defined for the directive!'); return; } var singleTextRowTemplate = "{{::value}}{{::title}}
{{::text}}0\">Errors ({{row.branch['errors'].length}}):
" + // "{{error}} 0\">
0\">Artifacts ({{::row.branch['artifacts'].length}}):
"; $scope.details_defs = { default: "{{::row.branch['message'] ? row.branch['message'] : row.branch['description']}}{{::row.branch['destination']}}Process Id: {{::row.branch['processId']}}
"+ "Ready to run {{::row.branch['tests'].length}} tests:
Name: {{::row.branch['name']}}
" + "Scope: {{::row.branch['scope']}}
" + "Platform: {{::row.branch['platform']}}
" + "| " +
" Test Name: {{::row.branch['name']}} " + "Test Fixture: {{::row.branch['fixture']}} " + "Test Status: {{::row.branch['state'] ? $parent.$parent.$parent.$parent.$parent.convertTestStateToString(row.branch['state']) : $parent.$parent.$parent.$parent.$parent.convertTestStateToString(0)}} " + "Test Execution Time: {{::row.branch['durationMicroseconds'] ? (row.branch['durationMicroseconds']/1000).toHHMMSS() : (row.branch['duration']).toHHMMSS()}} " + " |
Assembly: {{::row.branch['assembly']}}
" + errorsMarkup + "| " +
" Run {{::row.branch['summary'].testsCount}} test(s). Passed: {{::row.branch['summary'].successCount}}, Failed: {{::row.branch['summary'].failedCount + row.branch['summary'].errorCount}}, Inconclusive: {{::row.branch['summary'].inconclusiveCount}}, Ignored: {{::row.branch['summary'].ignoredCount}}, Skipped: {{::row.branch['summary'].skippedCount}}, Not Runnable: {{::row.branch['summary'].notRunCount}} " + "Overall result: {{::row.branch['summary'].success ? 'PASS' : 'FAIL'}} " + "Suites count: {{::row.branch['summary'].suitesCount}} " + " |
Name: {{::row.branch['name']}}
" + artifactsMarkup + errorsMarkup + "