@@ -72,6 +72,7 @@ class RunnerPanel implements FocusListener {
72
72
JTextArea testErrorStackTextArea
73
73
JTextArea testWarningsTextArea
74
74
JTextArea testServerOutputTextArea
75
+ JTabbedPane testDetailTabbedPane
75
76
76
77
def Component getGUI () {
77
78
if (basePanel == = null ) {
@@ -216,6 +217,19 @@ class RunnerPanel implements FocusListener {
216
217
p. testErrorStackTextArea. text = test. errorStack
217
218
p. testWarningsTextArea. text = test. warnings
218
219
p. testServerOutputTextArea. text = test. serverOutput
220
+ var int tabIndex
221
+ if (test. counter. failure > 0 ) {
222
+ tabIndex = 1
223
+ } else if (test. counter. error > 0 ) {
224
+ tabIndex = 2
225
+ } else if (test. counter. warning > 0 ) {
226
+ tabIndex = 3
227
+ } else if (test. serverOutput !== null && test. serverOutput. length > 0 ) {
228
+ tabIndex = 4
229
+ } else {
230
+ tabIndex = 0
231
+ }
232
+ p. testDetailTabbedPane. selectedIndex = tabIndex
219
233
}
220
234
}
221
235
}
@@ -752,7 +766,7 @@ class RunnerPanel implements FocusListener {
752
766
testServerOutputPanel. add(testServerOutputScrollPane, c)
753
767
754
768
// split pane with all tabs
755
- val testDetailTabbedPane = new JTabbedPane ()
769
+ testDetailTabbedPane = new JTabbedPane ()
756
770
testDetailTabbedPane. add(" Test" , testPropertiesScrollPane)
757
771
testDetailTabbedPane. add(" Failures" , testFailuresPanel)
758
772
testDetailTabbedPane. add(" Errors" , testErrorStackPanel)
0 commit comments