160 lines
3.2 KiB
JSON
160 lines
3.2 KiB
JSON
{
|
|
"description": "Test `_INST`/`_SUBC` queries (#1005, en, skip virtuoso)",
|
|
"setup": [
|
|
{
|
|
"namespace": "NS_CATEGORY",
|
|
"page": "Foo",
|
|
"contents": ""
|
|
},
|
|
{
|
|
"namespace": "NS_CATEGORY",
|
|
"page": "Bar",
|
|
"contents": "[[Category:Foo]]"
|
|
},
|
|
{
|
|
"namespace": "NS_CATEGORY",
|
|
"page": "Bam",
|
|
"contents": "[[Category:Foo]]"
|
|
},
|
|
{
|
|
"page": "Page-annotated-with-subcategory",
|
|
"contents": "[[Category:Bar]] [[Category:Bam]]"
|
|
},
|
|
{
|
|
"page": "Page-annotated-with-another-subcategory",
|
|
"contents": "[[Category:Bam]]"
|
|
},
|
|
{
|
|
"page": "Page-annotated-with-supercategory-subcategory",
|
|
"contents": "[[Category:Foo]] [[Category:Bam]]"
|
|
}
|
|
],
|
|
"tests": [
|
|
{
|
|
"type": "query",
|
|
"about": "#0 query pages with annotated category(subcategory)",
|
|
"condition": "[[Category:Bar]]",
|
|
"printouts": [
|
|
"_INST"
|
|
],
|
|
"parameters": {
|
|
"limit": "10"
|
|
},
|
|
"assert-queryresult": {
|
|
"count": 1,
|
|
"results": [
|
|
"Page-annotated-with-subcategory#0##"
|
|
],
|
|
"datavalues": [
|
|
{
|
|
"property": "_INST",
|
|
"value": "Bar"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "query",
|
|
"about": "#1 disjuntive query for two categories",
|
|
"condition": "[[Category:Bar]] OR [[Category:Bam]]",
|
|
"printouts": [
|
|
"_INST"
|
|
],
|
|
"parameters": {
|
|
"limit": "10"
|
|
},
|
|
"assert-queryresult": {
|
|
"count": 3,
|
|
"results": [
|
|
"Page-annotated-with-subcategory#0##",
|
|
"Page-annotated-with-another-subcategory#0##",
|
|
"Page-annotated-with-supercategory-subcategory#0##"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "query",
|
|
"about": "#2 conjuntive query for two categories",
|
|
"condition": "[[Category:Bar]][[Category:Bam]]",
|
|
"printouts": [
|
|
"_INST"
|
|
],
|
|
"parameters": {
|
|
"limit": "10"
|
|
},
|
|
"assert-queryresult": {
|
|
"count": 1,
|
|
"results": [
|
|
"Page-annotated-with-subcategory#0##"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "query",
|
|
"about": "#3 find list of subcategories for selected super",
|
|
"condition": "[[Subcategory of::Category:Foo]]",
|
|
"printouts": [],
|
|
"parameters": {
|
|
"limit": "10"
|
|
},
|
|
"assert-queryresult": {
|
|
"count": 2,
|
|
"results": [
|
|
"Bar#14##",
|
|
"Bam#14##"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "query",
|
|
"about": "#4 find the super for a selected subcategory",
|
|
"condition": "[[-Subcategory of::Category:Bar]]",
|
|
"printouts": [],
|
|
"parameters": {
|
|
"limit": "10"
|
|
},
|
|
"assert-queryresult": {
|
|
"count": 1,
|
|
"results": [
|
|
"Foo#14##"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "query",
|
|
"about": "#5 disjuntive query for two categories",
|
|
"condition": "[[Category:Foo]] OR [[Category:Bam]]",
|
|
"printouts": [
|
|
"_INST"
|
|
],
|
|
"parameters": {
|
|
"limit": "10"
|
|
},
|
|
"assert-queryresult": {
|
|
"count": 3,
|
|
"results": [
|
|
"Page-annotated-with-subcategory#0##",
|
|
"Page-annotated-with-another-subcategory#0##",
|
|
"Page-annotated-with-supercategory-subcategory#0##"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"settings": {
|
|
"smwgNamespacesWithSemanticLinks": {
|
|
"NS_MAIN": true,
|
|
"NS_CATEGORY": true,
|
|
"SMW_NS_PROPERTY": true
|
|
},
|
|
"wgContLang": "en",
|
|
"smwgQSubcategoryDepth": 10
|
|
},
|
|
"meta": {
|
|
"skip-on": {
|
|
"virtuoso": "Virtuoso 6.1 rdfs / subproperty/subcategory hierarchies are not supported"
|
|
},
|
|
"version": "2",
|
|
"is-incomplete": false,
|
|
"debug": false
|
|
}
|
|
} |