Skip to content

Commit 56a770c

Browse files
committed
Refactor test toggle logic.
Avoids expanding failed/skipped tests when closing element. Fixes #5322. See also PR #5445 that provided the initial fix.
1 parent af66f71 commit 56a770c

File tree

1 file changed

+2
-4
lines changed
  • src/robot/htmldata/rebot

1 file changed

+2
-4
lines changed

src/robot/htmldata/rebot/log.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ function toggleTest(testId) {
88
var test = window.testdata.findLoaded(testId);
99
var autoExpand = test.status == "FAIL" || test.status == "SKIP";
1010
var closed = $('#' + testId).children('.element-header').hasClass('closed');
11-
12-
if (autoExpand)
11+
if (autoExpand && closed)
1312
expandFailed(test);
14-
15-
if (!autoExpand || !closed)
13+
else
1614
toggleElement(testId, ['keyword']);
1715
}
1816

0 commit comments

Comments
 (0)