Skip to content

Commit

Permalink
Merge pull request #480 from wblachowski/feature/test-summary
Browse files Browse the repository at this point in the history
Test summary stats on the main report page
  • Loading branch information
tkaik authored Jul 23, 2019
2 parents 41cba3e + eb50073 commit 731a585
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All notable changes to AET will be documented in this file.
- [PR-506](https://github.com/Cognifide/aet/pull/506) About tab ([#475](https://github.com/Cognifide/aet/issues/475))
- [PR-462](https://github.com/Cognifide/aet/pull/462) Popup window unification([#367](https://github.com/Cognifide/aet/issues/367))
- [PR-489](https://github.com/Cognifide/aet/pull/489) Cleaner integration tests
- [PR-480](https://github.com/Cognifide/aet/pull/480) Test summary stats on the main report page. ([#474](https://github.com/Cognifide/aet/issues/474))

## Version 3.2.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,19 @@ define([], function () {
***************************************/

function updateSuiteView() {
vm.tests = metadataAccessService.getTests();
var tests = metadataAccessService.getTests();
vm.testWrappers = [];
_.forEach(tests, function (test) {
var urlStats = {};
_.forEach(test.urls, function (url) {
var status = url.getStatus();
urlStats[status] = urlStats[status] ? urlStats[status] + 1 : 1;
});
vm.testWrappers.push({
test: test,
stats: urlStats
});
});
}
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
<div class="page-main">
<div class="row reports-list">
<div class="reports-list-item {{test.getStatus()}}"
ng-repeat="test in suiteView.tests | aetTestStatusFilter:$root.activeFilters | aetTestSearchFilter:$root.searchText | orderBy:'name'"
ng-repeat="testWrapper in suiteView.testWrappers | aetTestStatusFilter:$root.activeFilters | aetTestSearchFilter:$root.searchText | orderBy:'name'"
ng-init="test = testWrapper.test; stats = testWrapper.stats;"
ng-class="test.getStatus()">
<a ui-sref="test({'suite':data.project,'test':test.name})">
<div class="inner">
Expand All @@ -33,6 +34,19 @@
<i class="fas {{theme.statusClasses[test.getStatus()]}}"></i>
</div>
<span>{{test.name}}</span>
<div class="tile-stats">
<span class="statistics">URLs statistics:</span>
<span class="status failed" data-toggle="popover" data-content="Failed URLs"
data-trigger="hover" data-container="body">{{stats.failed || 0}}</span> /
<span class="status warning" data-toggle="popover" data-content="Warning URLs"
data-trigger="hover" data-container="body">{{stats.warning || 0}}</span> /
<span class="status passed" data-toggle="popover" data-content="Passed URLs"
data-trigger="hover" data-container="body">{{stats.passed || 0}}</span> /
<span class="status conditionallyPassed" data-toggle="popover" data-content="Conditionally passed URLs"
data-trigger="hover" data-container="body">{{stats.conditionallyPassed || 0}}</span> /
<span class="status rebased" data-toggle="popover" data-content="Accepted URLs"
data-trigger="hover" data-container="body">{{stats.rebased || 0}}</span>
</div>
</div>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions report/src/main/webapp/assets/sass/_report.scss
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@
}
}
}

.statistics {
color: $gray_dark !important;
}
}

.test-icons {
Expand Down
4 changes: 0 additions & 4 deletions report/src/main/webapp/assets/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,6 @@ body {
color: $conditionallyPassed;
}

.statistics {
color: $gray_dark !important;;
}

.name {
font-family: $font_bold;
font-size: 18px;
Expand Down

0 comments on commit 731a585

Please sign in to comment.