134 lines
2.5 KiB
JSON
134 lines
2.5 KiB
JSON
{
|
|
"description": "Test `_wpg` and category using subquery construct",
|
|
"setup": [
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "Has page",
|
|
"contents": "[[Has type::Page]]"
|
|
},
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "Has page",
|
|
"contents": "[[Has type::Page]]"
|
|
},
|
|
{
|
|
"page": "Q0620/1",
|
|
"contents": "[[Has page::Q0620/1]] [[Category:Q0620]]"
|
|
},
|
|
{
|
|
"page": "Q0620/2",
|
|
"contents": "[[Category:Q0620]]"
|
|
},
|
|
{
|
|
"page": "Q0620/3",
|
|
"contents": "[[Has page::Q0620/1]]"
|
|
}
|
|
],
|
|
"tests": [
|
|
{
|
|
"type": "query",
|
|
"about": "#0 (match all with `Has page::Q0620/1`)",
|
|
"condition": "[[Has page::<q>[[Category:Q0620]]</q>]]",
|
|
"printouts": [],
|
|
"parameters": {
|
|
"limit": "10"
|
|
},
|
|
"assert-queryresult": {
|
|
"count": 2,
|
|
"results": [
|
|
"Q0620/1#0##",
|
|
"Q0620/3#0##"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "query",
|
|
"about": "#1",
|
|
"condition": "[[Has page::<q>[[Category:Q0620]]</q>]] [[Category:Q0620]]",
|
|
"printouts": [],
|
|
"parameters": {
|
|
"limit": "10"
|
|
},
|
|
"assert-queryresult": {
|
|
"count": 1,
|
|
"results": [
|
|
"Q0620/1#0##"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "query",
|
|
"about": "#2",
|
|
"condition": "[[Has page::<q>[[Has page::<q>[[Category:Q0620]]</q>]]</q>]]",
|
|
"printouts": [],
|
|
"parameters": {
|
|
"limit": "10"
|
|
},
|
|
"assert-queryresult": {
|
|
"count": 2,
|
|
"results": [
|
|
"Q0620/1#0##",
|
|
"Q0620/3#0##"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "query",
|
|
"about": "#3",
|
|
"condition": "[[Has page::<q>[[Has page::<q>[[Category:Q0620]]</q>]]</q>]]",
|
|
"printouts": [],
|
|
"parameters": {
|
|
"limit": "10"
|
|
},
|
|
"assert-queryresult": {
|
|
"count": 2,
|
|
"results": [
|
|
"Q0620/1#0##",
|
|
"Q0620/3#0##"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "query",
|
|
"about": "#4",
|
|
"condition": "[[Has page.Has page::<q>[[Category:Q0620]]</q>]]",
|
|
"printouts": [],
|
|
"parameters": {
|
|
"limit": "10"
|
|
},
|
|
"assert-queryresult": {
|
|
"count": 2,
|
|
"results": [
|
|
"Q0620/1#0##",
|
|
"Q0620/3#0##"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "query",
|
|
"about": "#5",
|
|
"skip-on": {
|
|
"elastic": [ "not", "`Category:!` only works with ES." ]
|
|
},
|
|
"condition": "[[Has page::<q>[[Has page::<q>[[Category:Q0620]]</q>]]</q>]] [[Category:!Q0620]]",
|
|
"printouts": [],
|
|
"parameters": {
|
|
"limit": "10"
|
|
},
|
|
"assert-queryresult": {
|
|
"count": 1,
|
|
"results": [
|
|
"Q0620/3#0##"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"settings": {
|
|
"smwgQSubcategoryDepth": 10
|
|
},
|
|
"meta": {
|
|
"version": "2",
|
|
"is-incomplete": false,
|
|
"debug": false
|
|
}
|
|
} |