gplx/mediawiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1104.json

86 lines
1.8 KiB
JSON

{
"description": "Test `_rec` to find correct target for redirected property (#1244, en)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has status",
"contents": "[[Has type::Text]]"
},
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has date",
"contents": "[[Has type::Date]]"
},
{
"namespace": "SMW_NS_PROPERTY",
"page": "Project",
"contents": "[[Has type::Record]] [[Has fields::Has status;Has date]]"
},
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has project status",
"contents": "[[Has type::Text]]"
},
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has status",
"contents": "#REDIRECT [[Property:Has project status]]"
},
{
"page": "Example/1103/1",
"contents": "[[Category:Record redirect example]] [[Project::closed;15 Jan 1970]]"
},
{
"page": "Example/1103/2",
"contents": "{{#ask: [[Category:Record redirect example]] [[Project::closed;~1970]]|?Project=Status|+index=1|format=plainlist}}"
}
],
"tests": [
{
"type": "format",
"about": "#0 indexed output",
"subject": "Example/1103/2",
"assert-output": {
"to-contain": [
"title=\"Property:Project\">Status</a>: closed"
]
}
},
{
"type": "query",
"about": "#0",
"condition": "[[Category:Record redirect example]] [[Project::closed;~1970]]",
"printouts": [
"Project"
],
"parameters": {
"limit": "10"
},
"assert-queryresult": {
"count": 1,
"results": [
"Example/1103/1#0##"
],
"datavalues": [
{
"property": "Project",
"value": "closed;15 Jan 1970"
}
]
},
"store": {
"clear-cache": true
}
}
],
"settings": {
"smwStrictComparators": false,
"wgContLang": "en",
"wgLang": "en"
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}