1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-18 11:29:55 +00:00

Fix handling of currentTiddler variable

Fixes problem reported by @btheado in https://github.com/Jermolene/TiddlyWiki5/pull/7817#issuecomment-2103704468
This commit is contained in:
Jeremy Ruston 2024-05-15 12:37:25 +01:00
parent 4234aa968e
commit eb4e9d86ac
2 changed files with 17 additions and 0 deletions

View File

@ -112,6 +112,7 @@ TestCaseWidget.prototype.render = function(parent,nextSibling) {
this.setVariable("outputHTML",outputHTML);
this.setVariable("expectedHTML",expectedHTML);
this.setVariable("testResult",testResult);
this.setVariable("currentTiddler",this.testcaseTestOutput);
}
// Don't display anything if testHideIfPass is "yes" and the tests have passed
if(this.testcaseHideIfPass === "yes" && testResult === "pass") {

View File

@ -0,0 +1,16 @@
description: currentTiddler should be properly set
tags: $:/tags/wiki-test-spec
title: TestCases/TestCaseTiddler/currentTiddler
type: text/vnd.tiddlywiki-multiple
title: Narrative
currentTiddler variable in Output tiddler should be "Output"
+
title: Output
<$text text=<<currentTiddler>>>
+
title: ExpectedResult
<p>Output</p>