101 lines
2.1 KiB
JSON
101 lines
2.1 KiB
JSON
{
|
|
"description": "Test `smw/schema` on `PROPERTY_CONSTRAINT_SCHEMA` with `allowed_namespaces` and `Constraint schema`",
|
|
"setup": [
|
|
{
|
|
"namespace": "SMW_NS_SCHEMA",
|
|
"page": "Constraint:User namespace",
|
|
"contents": {
|
|
"import-from": "/../Fixtures/p-1100-constraint-user.json"
|
|
}
|
|
},
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "Username",
|
|
"contents": "[[Has type::Page]] [[Constraint schema::Constraint:User namespace]]"
|
|
},
|
|
{
|
|
"page": "P1100/1",
|
|
"contents": "[[Username::P1100]]"
|
|
},
|
|
{
|
|
"page": "P1100/2",
|
|
"contents": "[[Username::User:P1100]]"
|
|
}
|
|
],
|
|
"tests": [
|
|
{
|
|
"type": "parser",
|
|
"about": "#0 (invalid assignment on `allowed_namespaces`)",
|
|
"subject": "P1100/1",
|
|
"assert-store": {
|
|
"semantic-data": {
|
|
"strict-mode-valuematch": false,
|
|
"propertyCount": 3,
|
|
"propertyKeys": [
|
|
"_SKEY",
|
|
"_MDAT",
|
|
"_ERRC"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "parser",
|
|
"about": "#0.1 (invalid assignment on `allowed_namespaces`)",
|
|
"namespace": "NS_MAIN",
|
|
"subject": "P1100/1#_ERRf6039d44b29456b20f8f373155ae4973",
|
|
"assert-store": {
|
|
"semantic-data": {
|
|
"strict-mode-valuematch": false,
|
|
"propertyCount": 4,
|
|
"propertyKeys": [
|
|
"_SKEY",
|
|
"_ERRT",
|
|
"_ERRP",
|
|
"_ERR_TYPE"
|
|
],
|
|
"propertyValues": [
|
|
{ "serialization": "[2,\"smw-constraint-violation-allowed-namespace-no-match\",\"Username\",\"P1100\",\"NS_USER\"]" }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "parser",
|
|
"about": "#1 (valid assignment on `allowed_namespaces`)",
|
|
"subject": "P1100/2",
|
|
"assert-store": {
|
|
"semantic-data": {
|
|
"strict-mode-valuematch": false,
|
|
"propertyCount": 3,
|
|
"propertyKeys": [
|
|
"_SKEY",
|
|
"_MDAT",
|
|
"Username"
|
|
],
|
|
"propertyValues": [
|
|
"P1100#2##"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"settings": {
|
|
"wgContLang": "en",
|
|
"wgLang": "en",
|
|
"smwgPageSpecialProperties": [
|
|
"_MDAT"
|
|
],
|
|
"smwgNamespacesWithSemanticLinks": {
|
|
"NS_MAIN": true,
|
|
"SMW_NS_PROPERTY": true,
|
|
"SMW_NS_SCHEMA": true
|
|
}
|
|
},
|
|
"meta": {
|
|
"version": "2",
|
|
"is-incomplete": false,
|
|
"debug": false
|
|
}
|
|
}
|