This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git


The following commit(s) were added to refs/heads/master by this push:
     new 53a1ff1  Current tracked branch: Option added to show tests longer 
that N seconds: fix UI bug, don't hide because of fail rate filter
53a1ff1 is described below

commit 53a1ff120787283a1e31f670372b8d6c1b098de7
Author: Dmitriy Pavlov <[email protected]>
AuthorDate: Fri Jul 26 20:56:53 2019 +0300

    Current tracked branch: Option added to show tests longer that N seconds: 
fix UI bug, don't hide because of fail rate filter
---
 ignite-tc-helper-web/src/main/webapp/js/testfails-2.2.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ignite-tc-helper-web/src/main/webapp/js/testfails-2.2.js 
b/ignite-tc-helper-web/src/main/webapp/js/testfails-2.2.js
index d9772fd..69a984a 100644
--- a/ignite-tc-helper-web/src/main/webapp/js/testfails-2.2.js
+++ b/ignite-tc-helper-web/src/main/webapp/js/testfails-2.2.js
@@ -788,7 +788,7 @@ function failureRateToColor(failureRate) {
 }
 
 
-//@param testFail - see TestFailure
+//@param testFail - see DsTestFailureUi
 function showTestFailData(testFail, isFailureShown, settings) {
     var failRateDefined =
         isDefinedAndFilled(testFail.histBaseBranch)
@@ -802,7 +802,9 @@ function showTestFailData(testFail, isFailureShown, 
settings) {
             ? testFail.histBaseBranch.flakyComments
             : null;
 
-    if (isFailureShown) {
+    let shownBecauseOfDuration = (isDefinedAndFilled(testFail.success) && 
testFail.success === true) || !isFailureShown;
+
+    if (!shownBecauseOfDuration) {
         if (failRate != null) {
             if (parseFloat(failRate) < settings.minFailRate)
                 return ""; //test is hidden
@@ -812,7 +814,7 @@ function showTestFailData(testFail, isFailureShown, 
settings) {
         }
 
         if (flakyCommentsInBase != null && settings.hideFlakyFailures)
-            return ""; // test is hidder
+            return ""; // test is hidden
     }
 
     var res = "<tr><td align='right' valign='top' colspan='2' width='10%'>";
@@ -949,9 +951,7 @@ function showTestFailData(testFail, isFailureShown, 
settings) {
     }
 
 
-    let showDuration = (isDefinedAndFilled(testFail.success) && 
testFail.success === true) || !isFailureShown;
-
-    if (showDuration && isDefinedAndFilled(testFail.durationPrintable))
+    if (shownBecauseOfDuration && 
isDefinedAndFilled(testFail.durationPrintable))
         res += " duration " + testFail.durationPrintable;
 
     if (bold)

Reply via email to