Add visual indicators for test run results
This commit is contained in:
@ -26,3 +26,26 @@
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
}
|
||||
|
||||
div.unit-test-result {
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
div.positive-result {
|
||||
border-radius: 50%;
|
||||
background-color: #8efa00;
|
||||
-webkit-box-shadow: 0px 0px 11px 1px rgba(44,222,0,1);
|
||||
-moz-box-shadow: 0px 0px 11px 1px rgba(44,222,0,1);
|
||||
box-shadow: 0px 0px 11px 1px rgba(44,222,0,1);
|
||||
}
|
||||
|
||||
div.negative-result {
|
||||
border-radius: 50%;
|
||||
background-color: #ff2600;
|
||||
-webkit-box-shadow: 0px 0px 11px 1px rgba(222,0,0,1);
|
||||
-moz-box-shadow: 0px 0px 11px 1px rgba(222,0,0,1);
|
||||
box-shadow: 0px 0px 11px 1px rgba(222,0,0,1);
|
||||
}
|
||||
|
@ -47,7 +47,12 @@ h1 = "#{@exercise} (external user #{@external_user})"
|
||||
td.clickable = submission.created_at.strftime("%F %T")
|
||||
td = submission.cause
|
||||
td = submission.score
|
||||
td = submission.testruns.map{|run| run.passed ? 'p' : 'f'}.join(' ')
|
||||
td
|
||||
-submission.testruns.each do |run|
|
||||
- if run.passed
|
||||
.unit-test-result.positive-result
|
||||
- else
|
||||
.unit-test-result.negative-result
|
||||
td = Time.at(deltas[1..index].inject(:+)).utc.strftime("%H:%M:%S") if index > 0
|
||||
p = t('.addendum')
|
||||
|
||||
|
Reference in New Issue
Block a user