forked from bcosca/fatfree
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds error listings above the unit test results, which makes it easier to spot failed tests (not only for people with red-green color blindness). Also it looks quite nice. Depends on PR f3-factory/fatfree-core#64.
- Loading branch information
Showing
2 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,23 @@ <h1>{{ @VERSION }}</h1> | |
</div> | ||
<div class="main"> | ||
<h1>{{ @active }}</h1> | ||
{~ foreach (@results as @i=>@result): ~} | ||
<p> | ||
<span class="status {{ @result.status?'pass':'fail' }}">{{ @i+1 }}</span> | ||
|
||
<h2 id="errors">Errors</h2> | ||
{~ if (@errors): ~} | ||
{~ foreach (@errors as @result): ~} | ||
<p> | ||
<span class="status fail"><a href="{{ @PATH }}#test-{{ @result.id }}">{{ @result.id }}</a></span> | ||
<span class="text">{{ @result.text }} {~ if (@result.source) echo '('[email protected].')' ~}</span><br/> | ||
</p> | ||
{~ endforeach ~} | ||
{~ else: ~} | ||
<p>No errors.</p> | ||
{~ endif ~} | ||
|
||
<h2 id="tests">Tests</h2> | ||
{~ foreach (@results as @result): ~} | ||
<p id="test-{{ @result.id }}"> | ||
<span class="status {{ @result.status?'pass':'fail' }}">{{ @result.id }}</span> | ||
<span class="text">{{ @result.text }} {~ if ([email protected] && @result.source) echo '('[email protected].')' ~}</span><br/> | ||
</p> | ||
{~ endforeach ~} | ||
|