gplx/mediawiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/special-search-0001.json

70 lines
1.4 KiB
JSON

{
"description": "Test output in `Special:Search` for SMWSearch (`wgLanguageCode=en`, `wgContLang=en`, `wgSearchType=SMWSearch`)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has text",
"contents": "[[Has type::Text]]"
},
{
"page": "Example/SS0001/1",
"contents": "[[Has text::Some text to search]]"
}
],
"tests": [
{
"type": "parser",
"about": "#0",
"subject": "Example/SS0001/1",
"assert-store": {
"semantic-data": {
"strictPropertyValueMatch": false,
"propertyCount": 3,
"propertyKeys": [
"_SKEY",
"_MDAT",
"Has_text"
],
"propertyValues": [
"Some text to search"
]
}
}
},
{
"type": "special",
"about": "#1 results matched by the SMWSearch extension",
"special-page": {
"page": "Search",
"query-parameters": "",
"request-parameters": {
"search": "[[Has text::~*Some text*]]"
}
},
"assert-output": {
"to-contain": [
"<ul class='mw-search-results'>",
"Example/SS0001/1"
]
}
}
],
"settings": {
"wgContLang": "en",
"wgLanguageCode": "en",
"wgSearchType": "SMWSearch",
"wgCapitalLinks" : true,
"smwgNamespacesWithSemanticLinks": {
"NS_MAIN": true,
"SMW_NS_PROPERTY": true
}
},
"meta": {
"skip-on": {
"mediawiki": [ ">1.40.x", "Check connection provider, should be IProviderConnection for MW 1.41+."]
},
"version": "2",
"is-incomplete": false,
"debug": false
}
}