Add visual indicators for test run results

This commit is contained in:
Maximilian Grundke
2016-03-09 17:57:18 +01:00
parent dcb05b9169
commit 26d2b11d9f
2 changed files with 29 additions and 1 deletions

View File

@ -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);
}

View File

@ -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')