59 lines
1.4 KiB
JSON
59 lines
1.4 KiB
JSON
{
|
|
"description": "Test `_ref_rec`, `Has fields` with `:` name reference",
|
|
"setup": [
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "wd:id",
|
|
"contents": "[[Has type::External identifier]][[External formatter uri::https://www.wikidata.org/entity/$1]]"
|
|
},
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "wd:reference",
|
|
"contents": "[[Has type::Reference]] [[Has fields::Property:URL;wd:id]]"
|
|
},
|
|
{
|
|
"page": "Test:P0920/1",
|
|
"contents": "[[wd:reference::https://en.wikipedia.org/wiki/Franz_Schubert;Q7312]]"
|
|
}
|
|
],
|
|
"tests": [
|
|
{
|
|
"type": "parser",
|
|
"about": "#0 (correct formatting for external identifier)",
|
|
"subject": "Test:P0920/1",
|
|
"assert-store": {
|
|
"semantic-data": {
|
|
"strict-mode-valuematch": false,
|
|
"propertyCount": 3,
|
|
"propertyKeys": [
|
|
"_MDAT",
|
|
"_SKEY",
|
|
"Wd:reference"
|
|
]
|
|
}
|
|
},
|
|
"assert-output": {
|
|
"to-contain": [
|
|
"data-content=\"<ul><li><a href=".*:Wd:id"",
|
|
"title=".*:Wd:id">Wd:id</a>: <a href="https://www.wikidata.org/entity/Q7312" target="_blank">Q7312</a></li></ul>\" title=\"Wd:id: Q7312\">"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"settings": {
|
|
"wgContLang": "en",
|
|
"wgLang": "en",
|
|
"smwgPageSpecialProperties": [
|
|
"_MDAT"
|
|
],
|
|
"smwgNamespacesWithSemanticLinks": {
|
|
"NS_MAIN": true,
|
|
"SMW_NS_PROPERTY": true
|
|
}
|
|
},
|
|
"meta": {
|
|
"version": "2",
|
|
"is-incomplete": false,
|
|
"debug": false
|
|
}
|
|
} |