Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit ceed51a

Browse files
loysollivierMiloCasagrande
authored andcommitted
Tests view misc fix
* Sort test suites count by selected board as well Test view: /test/board/ sort by board as well to count the number of test suites. * View test/board/ make test suite unique count unique Test view by test/board/ make the test suite unique count unique by sorting by name. Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
1 parent 91f89f2 commit ceed51a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

app/dashboard/static/js/app/view-tests-board.2017.7.2.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ require([
5353
batchOps.push({
5454
method: 'GET',
5555
resource: 'count',
56+
distinct: 'name',
5657
document: 'test_suite',
5758
operation_id: 'count-suites',
5859
query: gBaseSelf
@@ -146,6 +147,7 @@ require([
146147
var suiteId;
147148
var suiteTree;
148149
var suiteBranch;
150+
var suiteQuery;
149151
var queryStr;
150152
var queryData;
151153
var results;
@@ -154,6 +156,8 @@ require([
154156
suiteId = result._id;
155157
suiteTree = result.job;
156158
suiteBranch = result.git_branch;
159+
suiteQuery = 'board=' + gBoard + '&git_branch=' + suiteBranch;
160+
suiteQuery += '&job=' + suiteTree;
157161

158162
if (suiteId) {
159163
queryStr = 'test_suite_id=' + suiteId.$oid;
@@ -164,7 +168,7 @@ require([
164168
operation_id: 'suites-count-' + suiteTree,
165169
resource: 'count',
166170
document: 'test_suite',
167-
query: 'git_branch=' + suiteBranch + '&job=' + suiteTree
171+
query: suiteQuery
168172
});
169173
batchOps.push({
170174
method: 'GET',

0 commit comments

Comments
 (0)