gplx/mediawiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/special-ask-0015.json

71 lines
1.4 KiB
JSON

{
"description": "Test `format=embedded` output via `Special:Ask`",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has page",
"contents": "[[Has type::Page]]"
},
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has text",
"contents": "[[Has type::Text]]"
},
{
"page": "Test:SA0015/1",
"contents": "Has page: [[Has page::Test:SA0015/2]] [[Category:SA0015]]"
},
{
"page": "Test:SA0015/2",
"contents": "Has text: [[Has text::SA0015]] [[Category:SA0015]]"
}
],
"tests": [
{
"type": "special",
"about": "#0",
"special-page": {
"page": "Ask",
"request-parameters": {
"p": {
"link": "none",
"limit": "10",
"offset": "0",
"mainlabel": "",
"format": "embedded"
},
"q": "[[Category:SA0015]]"
}
},
"assert-output": {
"to-contain": [
"<h1>.*Test:SA0015.2F1.*</h1>",
"Has page: <a class=\".*selflink\">Test:SA0015/2</a>",
"<h1>.*Test:SA0015/2.*</h1>",
"<b>Test:SA0015/2</b>"
]
}
}
],
"settings": {
"wgContLang": "en",
"wgLang": "en",
"wgLanguageCode": "en",
"smwgPageSpecialProperties": [
"_MDAT"
],
"smwgNamespacesWithSemanticLinks": {
"NS_MAIN": true,
"SMW_NS_PROPERTY": true
}
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false,
"skip-on": {
"mediawiki": [ ">1.41.x", "Heading and anchor HTML has changed. Covered by special-ask-0015-mw142.json" ]
}
}
}