@@ -333,11 +333,21 @@ private void UpdateTestResult(@event @event)
333333 {
334334 testResult [ "Icon" ] = ( byte [ ] ) imageConverter . ConvertTo ( IconChar . TimesCircle . ToBitmap ( IconFont . Solid , IconSize , Color . Orange ) , typeof ( byte [ ] ) ) ;
335335 testResult [ "Status" ] = StatusFailure ;
336+
337+ colorProgressBar . BeginInvoke ( ( MethodInvoker ) delegate
338+ {
339+ colorProgressBar . BarColor = Color . DarkRed ;
340+ } ) ;
336341 }
337342 else if ( counter . error > 0 )
338343 {
339344 testResult [ "Icon" ] = ( byte [ ] ) imageConverter . ConvertTo ( IconChar . ExclamationCircle . ToBitmap ( Color . Red , IconSize ) , typeof ( byte [ ] ) ) ;
340345 testResult [ "Status" ] = StatusError ;
346+
347+ colorProgressBar . BeginInvoke ( ( MethodInvoker ) delegate
348+ {
349+ colorProgressBar . BarColor = Color . DarkRed ;
350+ } ) ;
341351 }
342352 else if ( counter . warning > 0 )
343353 {
@@ -535,8 +545,15 @@ private void gridResults_SelectionChanged(object sender, EventArgs e)
535545
536546 txtErrorMessage . Text = rowTestResult . Row [ "Error" ] == null ? "" : rowTestResult . Row [ "Error" ] . ToString ( ) . Replace ( "\n " , "\r \n " ) ;
537547
548+ txtFailureMessage . Text = "" ;
549+
538550 dataViewExpectations . RowFilter = $ "TestResultId = '{ rowTestResult . Row [ "Id" ] } '";
539551
552+ if ( dataViewExpectations . Count > 0 )
553+ {
554+ dataGridViewExpectations . Rows [ 0 ] . Selected = true ;
555+ }
556+
540557 if ( ! Running )
541558 {
542559 if ( rowTestResult . Row [ "Status" ] == null )
@@ -645,10 +662,9 @@ private void dataGridViewExpectations_SelectionChanged(object sender, EventArgs
645662
646663 if ( row . DataBoundItem is DataRowView rowExpectation )
647664 {
648- txtFailureMessage . Text = rowExpectation . Row [ "Message" ] . ToString ( ) + "\r \n \r \n " + rowExpectation . Row [ "Caller" ] . ToString ( ) ;
665+ txtFailureMessage . Text = $ " { rowExpectation . Row [ "Message" ] . ToString ( ) . Replace ( " \n " , "\r \n " ) } \r \n \r \n { rowExpectation . Row [ "Caller" ] . ToString ( ) . Replace ( " \n " , " \r \n " ) } " ;
649666 }
650667 }
651-
652668 }
653669 }
654670}
0 commit comments