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

82 lines
2.0 KiB
JSON

{
"description": "Test `format=table` on `Special:Ask` with `headers=plain` (#2702, `wgContLang=en`, `wgLang=en`)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has extra text",
"contents": "[[Has type::Text]]"
},
{
"page": "Example/SA0008/1",
"contents": "[[Has extra text::SA0008]]"
},
{
"page": "Example/SA0008/2",
"contents": "[[Has extra text::SA0008]]"
}
],
"tests": [
{
"type": "special",
"about": "#0 with headers",
"special-page": {
"page": "Ask",
"request-parameters": {
"p": {
"limit": "10",
"offset": "0",
"headers": "",
"format": "table"
},
"q": "[[Has extra text::SA0008]]",
"po": "?Has extra text=Modified <i>label</i> for text"
}
},
"assert-output": {
"to-contain": [
"<thead><th>&nbsp;</th><th class=\"Modified-label-for-text\"><a href=.* title=\"Property:Has extra text\">Modified <i>label</i> for text</a></th></thead>",
"<a href=.* title=\"Example/SA0008/1\">Example/SA0008/1</a>",
"<a href=.* title=\"Example/SA0008/2\">Example/SA0008/2</a>"
]
}
},
{
"type": "special",
"about": "#1 with headers plain",
"special-page": {
"page": "Ask",
"request-parameters": {
"p": {
"limit": "10",
"offset": "0",
"headers": "plain",
"format": "table"
},
"q": "[[Has extra text::SA0008]]",
"po": "?Has extra text=Modified <i>label</i> for text"
}
},
"assert-output": {
"to-contain": [
"<thead><th>&nbsp;</th><th class=\"Modified-label-for-text\">Modified <i>label</i> for text</th></thead>",
"<a href=.* title=\"Example/SA0008/1\">Example/SA0008/1</a>",
"<a href=.* title=\"Example/SA0008/2\">Example/SA0008/2</a>"
]
}
}
],
"settings": {
"wgContLang": "en",
"wgLang": "en",
"smwgNamespacesWithSemanticLinks": {
"NS_MAIN": true,
"SMW_NS_PROPERTY": true
}
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}