1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-20 11:19:45 +00:00
TiddlyWiki5/editions/test/tiddlers/tests/data/data-widget/ImportCompound.tid
jeremy@jermolene.com d9b6384884 Don't have data widget rendering its own JSON
Making the data widget render its raw JSON (introduced in 683ec33004) was a bad idea as it messes up the innerwiki use of the data widget. Instead we use the testcase widget with a special template to render the raw JSON of the payload of a testcase, thus giving us a way to test the data widget
2023-05-04 08:57:43 +01:00

27 lines
776 B
Plaintext

title: Data/ImportCompound
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
description: Importing a compound payload tiddler and adding custom fields
title: Description
text: Importing a compound payload tiddler and adding custom fields
+
title: Output
\whitespace trim
<$testcase template="$:/core/ui/testcases/RawJSONTemplate">
<$data $compound-tiddler="Compound" custom="Alpha"/>
</$testcase>
+
title: Compound
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Payload Tiddler
tags: Alpha Beta Gamma
This is a payload tiddler from a compound tiddler
+
title: ExpectedResult
<p><div>[{"title":"Payload Tiddler","tags":"Alpha Beta Gamma","text":"This is a payload tiddler from a compound tiddler","custom":"Alpha"}]</div></p>