diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0415.json')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0415.json | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0415.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0415.json new file mode 100644 index 00000000..2f19eed8 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0415.json @@ -0,0 +1,65 @@ +{ + "description": "Test in-text annotation on `_tem` with display unit preference (en)", + "setup": [ + { + "namespace": "SMW_NS_PROPERTY", + "page": "Has temperature", + "contents": "[[Has type::Temperature]] [[Display unit::Celsius]]" + }, + { + "page": "Example/P0415/1", + "contents": "[[Has temperature:: 32 °F]] [[Has temperature::100 °C]]" + }, + { + "page": "Example/P0415/1a", + "contents": "{{#ask: [[Example/P0415/1]] |?Has temperature |?Has temperature#-=- |?Has temperature#-u=-u |?Has temperature#-n=-n |?Has temperature#°R=°R |format=table }}" + } + ], + "tests": [ + { + "type": "parser", + "about": "#0", + "subject": "Example/P0415/1", + "assert-store": { + "semantic-data": { + "strictPropertyValueMatch": false, + "propertyCount": 3, + "propertyKeys": [ + "_SKEY", + "_MDAT", + "Has_temperature" + ], + "propertyValues": [ + 273.15, + 373.15 + ] + } + } + }, + { + "type": "parser", + "about": "#2", + "subject": "Example/P0415/1a", + "assert-output": { + "to-contain": [ + "<span class=\"smwtext\">0 °C</span><span class=\"smwttcontent\">273.15 K <br />32 °F <br />491.67 °R <br /></span></span>", + "<span class=\"smwtext\">100 °C</span><span class=\"smwttcontent\">373.15 K <br />212 °F <br />671.67 °R <br /></span></span>", + "<td class=\"- smwtype_tem\" data-sort-value=\"273.15\">0 °C<br />100 °C</td>", + "<td class=\"-u smwtype_tem\" data-sort-value=\"273.15\">°C<br />°C</td>", + "<td class=\"-n smwtype_tem\" data-sort-value=\"273.15\">0 <br />100 </td>", + "<span class=\"smwtext\">491.67 °R</span><span class=\"smwttcontent\">0 °C <br />273.15 K <br />32 °F <br /></span></span>", + "<span class=\"smwtext\">671.67 °R</span><span class=\"smwttcontent\">100 °C <br />373.15 K <br />212 °F <br /></span></span>" + ] + } + } + ], + "settings": { + "wgContLang": "en", + "wgLang": "en" + }, + "meta": { + "version": "2", + "is-incomplete": false, + "debug": false + } +}
\ No newline at end of file |