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

60 lines
1.4 KiB
JSON

{
"description": "Test in-text annotation for unrestricted template parse using `import-annotation=true` (#1055)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "HasUnrestrictedPage",
"contents": "[[Has type::Page]]"
},
{
"namespace": "NS_TEMPLATE",
"page": "CreateAnnotationViaAskTemplate",
"contents": "<includeonly>[[HasUnrestrictedPage::{{{1}}}]]</includeonly>"
},
{
"namespace": "NS_TEMPLATE",
"page": "TemplateForUnrestrictedParse",
"contents": "<includeonly>{{#ask: [[HasUnrestrictedPage::{{{1}}}]]|?HasUnrestrictedPage|link=none|format=template|template=CreateAnnotationViaAskTemplate|import-annotation=true}}</includeonly>"
},
{
"page": "Page-with-annotation",
"contents": "[[HasUnrestrictedPage::SearchPageWithAnnotation]]"
},
{
"page": "Page-with-template",
"contents": "{{TemplateForUnrestrictedParse|SearchPageWithAnnotation}}"
}
],
"tests": [
{
"type": "parser",
"about": "#0",
"subject": "Page-with-template",
"assert-store": {
"semantic-data": {
"strictPropertyValueMatch": false,
"propertyCount": 4,
"propertyKeys": [
"_SKEY",
"HasUnrestrictedPage",
"_MDAT",
"_ASK"
],
"propertyValues": [
"Page-with-annotation"
]
}
}
}
],
"settings": {
"smwgPageSpecialProperties": [
"_MDAT"
]
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}