mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 14:51:06 +01:00
Improve unit test detail panel in Differential.
This commit is contained in:
parent
720bf02570
commit
fb020ae27d
3 changed files with 580 additions and 564 deletions
File diff suppressed because it is too large
Load diff
|
@ -305,11 +305,17 @@ class DifferentialRevisionViewController extends DifferentialController {
|
||||||
$name = phutil_escape_html(idx($test, 'name'));
|
$name = phutil_escape_html(idx($test, 'name'));
|
||||||
$result = phutil_escape_html(idx($test, 'result'));
|
$result = phutil_escape_html(idx($test, 'result'));
|
||||||
$userdata = phutil_escape_html(idx($test, 'userdata'));
|
$userdata = phutil_escape_html(idx($test, 'userdata'));
|
||||||
|
if (strlen($userdata) > 256) {
|
||||||
|
$userdata = substr($userdata, 0, 256).'...';
|
||||||
|
}
|
||||||
|
$userdata = str_replace("\n", '<br />', $userdata);
|
||||||
$unit_messages[] =
|
$unit_messages[] =
|
||||||
'<tr>'.
|
'<tr>'.
|
||||||
'<th>'.$name.'</th>'.
|
'<th>'.$name.'</th>'.
|
||||||
'<th class="unit-test-result result-'.$result.'">'.
|
'<th class="unit-test-result">'.
|
||||||
strtoupper($result).
|
'<div class="result-'.$result.'">'.
|
||||||
|
strtoupper($result).
|
||||||
|
'</div>'.
|
||||||
'</th>'.
|
'</th>'.
|
||||||
'<td>'.$userdata.'</td>'.
|
'<td>'.$userdata.'</td>'.
|
||||||
'</tr>';
|
'</tr>';
|
||||||
|
|
|
@ -66,8 +66,18 @@
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.differential-unit-table th.unit-test-result {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.differential-unit-table .result-fail {
|
.differential-unit-table .result-fail {
|
||||||
background: #ff3333;
|
background: #ff3333;
|
||||||
|
padding: 4px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.differential-unit-table .result-unsound {
|
||||||
|
background: #cc33cc;
|
||||||
|
padding: 4px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.differential-unit-table td {
|
.differential-unit-table td {
|
||||||
|
|
Loading…
Reference in a new issue