Make testcase tiddler tempalte link to itself

This commit is contained in:
Jeremy Ruston 2024-05-05 21:54:11 +01:00
parent d361a1e3cf
commit 39d463337b
2 changed files with 14 additions and 10 deletions

View File

@ -1,6 +1,7 @@
title: $:/core/ui/TestCaseTemplate
\parameters (hideIfPass:"no")
<$let linkTarget="yes">
<$testcase
testOutput="Output"
testExpectedResult="ExpectedResult"
@ -10,3 +11,4 @@ title: $:/core/ui/TestCaseTemplate
<$data $compound-tiddler=<<currentTiddler>>/>
<$data title="Description" text={{!!description}}/>
</$testcase>
</$let>

View File

@ -7,16 +7,18 @@ title: $:/core/ui/testcases/DefaultTemplate
<div class="tc-testcase-wrapper">
<div class="tc-testcase-header">
<h2>
<%if [<testResult>!match[]] %>
<span class={{{ tc-testcase-result-icon [<testResult>!match[fail]then[tc-testcase-result-icon-pass]] [<testResult>match[fail]then[tc-testcase-result-icon-fail]] +[join[ ]] }}}>
<%if [<testResult>!match[fail]] %>
{{$:/core/images/done-button}}
<%else%>
{{$:/core/images/close-button}}
<%endif%>
</span>
<%endif%>
<$view tiddler="Description" mode="inline"/>
<$genesis $type={{{ [<linkTarget>!match[]then[$link]else[div]] }}}>
<%if [<testResult>!match[]] %>
<span class={{{ tc-testcase-result-icon [<testResult>!match[fail]then[tc-testcase-result-icon-pass]] [<testResult>match[fail]then[tc-testcase-result-icon-fail]] +[join[ ]] }}}>
<%if [<testResult>!match[fail]] %>
{{$:/core/images/done-button}}
<%else%>
{{$:/core/images/close-button}}
<%endif%>
</span>
<%endif%>
<$view tiddler="Description" mode="inline"/>
</$genesis>
</h2>
</div>
<%if [<testResult>match[fail]] %>