gplx/mediawiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-1121.json

78 lines
1.8 KiB
JSON

{
"description": "Test `smw/schema` on `PROPERTY_PROFILE_SCHEMA` with `sequence_map` and redirects",
"setup": [
{
"namespace": "SMW_NS_SCHEMA",
"page": "Profile:AnnotationSequenceMap",
"contents": {
"import-from": "/../Fixtures/p-1120-annotation-sequence-map.json"
}
},
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has city",
"contents": "[[Has type::Page]] [[Profile schema::Profile:AnnotationSequenceMap]]"
},
{
"page": "City A",
"contents": "#REDIRECT [[City AA]]"
},
{
"page": "P1121/1",
"contents": "[[Has city::City A]] [[Has city::City B]] [[Has city::City C]] [[Category:P1121:1]]"
},
{
"page": "P1121/2",
"contents": "[[Has city::City B]] [[Has city::City A]] [[Has city::City C]] [[Category:P1121:2]]"
},
{
"page": "P1121/Q.1",
"contents": "{{#ask: [[Category:P1121:1]] [[Has city::+]] |?Has city |format=table |headers=plain |link=none }}"
},
{
"page": "P1121/Q.2",
"contents": "{{#ask: [[Category:P1121:2]] [[Has city::+]] |?Has city |format=table |headers=plain |link=none }}"
}
],
"tests": [
{
"type": "parser",
"about": "#0 (object value with redirect)",
"subject": "P1121/Q.1",
"assert-output": {
"to-contain": [
"<td class=\"Has-city smwtype_wpg\">City AA<br />City B<br />City C</td>"
]
}
},
{
"type": "parser",
"about": "#1 (object value with redirect)",
"subject": "P1121/Q.2",
"assert-output": {
"to-contain": [
"<td class=\"Has-city smwtype_wpg\">City B<br />City AA<br />City C</td>"
]
}
}
],
"settings": {
"wgContLang": "en",
"wgLang": "en",
"smwgPageSpecialProperties": [
"_MDAT"
],
"smwgNamespacesWithSemanticLinks": {
"NS_MAIN": true,
"NS_CATEGORY": true,
"SMW_NS_PROPERTY": true,
"SMW_NS_SCHEMA": true
}
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}