107 lines
2.4 KiB
JSON
107 lines
2.4 KiB
JSON
{
|
|
"description": "Test API `action=smwbrowse` + `type=property` with limit/offset, sort",
|
|
"setup": [
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "Api-smwbrowse-0003/1",
|
|
"contents": "[[Has type::Page]]"
|
|
},
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "Api-smwbrowse-0003/2",
|
|
"contents": "[[Has type::Page]]"
|
|
},
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "Api-smwbrowse-0003/3",
|
|
"contents": "[[Has type::Page]]"
|
|
},
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "Api-smwbrowse-0003/4",
|
|
"contents": "[[Has type::Page]]"
|
|
},
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "Api-smwbrowse-0003/5",
|
|
"contents": "[[Has type::Page]]"
|
|
},
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "Api-smwbrowse-0003/6",
|
|
"contents": "[[Has type::Page]]"
|
|
}
|
|
],
|
|
"tests": [
|
|
{
|
|
"type": "api",
|
|
"about": "#0 `smwbrowse` property search (limit=3, offset=2, sort=asc)",
|
|
"api": {
|
|
"parameters": {
|
|
"action": "smwbrowse",
|
|
"format": "json",
|
|
"browse": "property",
|
|
"params": "{ \"limit\": 3, \"offset\": 2, \"search\": \"Api-smwbrowse-0003\", \"sort\": \"asc\" }"
|
|
}
|
|
},
|
|
"assert-output": {
|
|
"to-contain": {
|
|
"contents-file" : "/../Fixtures/res.api-smwbrowse-0004.1.json"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "api",
|
|
"about": "#1 `smwbrowse` property search (limit=3, offset=2, sort=desc)",
|
|
"api": {
|
|
"parameters": {
|
|
"action": "smwbrowse",
|
|
"format": "json",
|
|
"browse": "property",
|
|
"params": "{ \"limit\": 3, \"offset\": 2, \"search\": \"Api-smwbrowse-0003\", \"sort\": \"desc\" }"
|
|
}
|
|
},
|
|
"assert-output": {
|
|
"to-contain": {
|
|
"contents-file" : "/../Fixtures/res.api-smwbrowse-0004.2.json"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "api",
|
|
"about": "#2 `smwbrowse` property search (limit=1, offset=5, sort=asc)",
|
|
"api": {
|
|
"parameters": {
|
|
"action": "smwbrowse",
|
|
"format": "json",
|
|
"browse": "property",
|
|
"params": "{ \"limit\": 1, \"offset\": 5, \"search\": \"Api-smwbrowse-0003\", \"sort\": \"asc\" }"
|
|
}
|
|
},
|
|
"assert-output": {
|
|
"to-contain": {
|
|
"contents-file" : "/../Fixtures/res.api-smwbrowse-0004.3.json"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"settings": {
|
|
"wgContLang": "en",
|
|
"wgLang": "en",
|
|
"smwgCacheUsage": {
|
|
"api.browse": false
|
|
},
|
|
"smwgNamespacesWithSemanticLinks": {
|
|
"NS_MAIN": true,
|
|
"SMW_NS_PROPERTY": true,
|
|
"SMW_NS_CONCEPT": true,
|
|
"NS_CATEGORY": true
|
|
}
|
|
},
|
|
"meta": {
|
|
"version": "2",
|
|
"is-incomplete": false,
|
|
"debug": false
|
|
}
|
|
}
|