[Recent Tests] Corrected run configuration presentation in recent tests

This commit is contained in:
Yaroslav Lepenkin
2016-06-15 15:41:35 +03:00
parent 5304a52d2f
commit fe7fb4b4da
3 changed files with 27 additions and 9 deletions
@@ -119,13 +119,13 @@ class RunConfigurationEntry(val runSettings: RunnerAndConfigurationSettings, ini
if (suites.size == 1) {
return suites[0].getEntriesToShow()
}
val failedSuites = suites.filter { it.failedTests.size > 0 }
if (failedSuites.size == 0) {
return listOf(this)
}
return failedSuites + this
return suites
.filter { it.failedTests.size > 0}
.sortedByDescending { it.runDate }
.fold(listOf<RecentTestsPopupEntry>(), { popupList, currentEntry ->
popupList + currentEntry.getEntriesToShow()
}) + this
}
}