65 lines
2.1 KiB
JSON
65 lines
2.1 KiB
JSON
{
|
|
"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|+order=asc |?Has temperature#-=-|+order=asc |?Has temperature#-u=-u|+order=asc |?Has temperature#-n=-n|+order=asc |?Has temperature#°R=°R|+order=asc |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
|
|
}
|
|
} |