Skip to content

Commit

Permalink
Fix displaying tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Cich0sza committed Aug 14, 2019
1 parent 03cd733 commit aac5acc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions report/src/main/webapp/app/components/testSearch.filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ define(['angularAMD'], function (angularAMD) {
return tests;
}

return tests.filter(function (test) {
return _.some(test.urls, function (url) {
return tests.filter(function (testWrapper) {
return _.some(testWrapper.test.urls, function (url) {
return matches(searchPhrase, url.name);
});
});
}

function matches(searchPhrase, name) {
return name && name.indexOf(searchPhrase) > 0;
return name && name.includes(searchPhrase);
}
}
});
4 changes: 2 additions & 2 deletions report/src/main/webapp/app/components/testStatus.filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ define(['angularAMD'], function (angularAMD) {
function filter(tests, statuses) {
var filteredTests = tests;
if (statuses && statuses.length > 0) {
filteredTests = _.filter(tests, function (test) {
return _.some(test.urls, function (url) {
filteredTests = _.filter(tests, function (testWrapper) {
return _.some(testWrapper.test.urls, function (url) {
return statuses.indexOf(url.getStatus()) > -1;
});
});
Expand Down

0 comments on commit aac5acc

Please sign in to comment.