1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
{
"description": "Test in-text annotation with `_PPLB` [preferred property label] (#1879, `wgContLang=en`, `wgLang=en`)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "P106",
"contents": {
"import-from": "/../Fixtures/P106.txt"
}
},
{
"page": "Example/P0436/1",
"contents": "{{#subobject: |P106=Teacher }}{{#subobject: |P106=Actor }}"
},
{
"page": "Example/P0436/Q.1",
"contents": "{{#ask: [[P106::+]] |?P106 }}"
},
{
"page": "Example/P0436/Q.2",
"contents": "{{#ask: [[P106::+]] |?P106 |headers=plain }}"
},
{
"page": "Example/P0436/Q.3",
"contents": "{{#ask: [[P106::+]] |?P106=with a different Label |headers=plain }}"
},
{
"page": "Example/P0436/Q.4",
"contents": "{{#ask: [[P106::+]] |?P106=with a different Label }}"
}
],
"tests": [
{
"type": "parser",
"about": "#0",
"namespace": "SMW_NS_PROPERTY",
"subject": "P106",
"assert-store": {
"semantic-data": {
"strictPropertyValueMatch": false,
"propertyCount": 6,
"propertyKeys": [
"_PPLB",
"_PDESC",
"_TYPE",
"_SKEY",
"_MDAT",
"_ERRC"
]
}
}
},
{
"type": "parser",
"about": "#0 (en)",
"subject": "Example/P0436/Q.1",
"assert-output": {
"to-contain": [
"data-title=\"Property\" title=\"occupation of a person; see also field of work (Property:P101)\">",
"title=\"Property:P106\">occupation</a>",
"<span class=\"smwttcontent\">occupation of a person; see also field of work (Property:P101)</span></span> <span title=\"P106\"><sup>ᵖ</sup></span>"
]
}
},
{
"type": "parser",
"about": "#1 (en, headers=plain)",
"subject": "Example/P0436/Q.2",
"assert-output": {
"to-contain": [
"<th class=\"occupation\">occupation</th>"
]
}
},
{
"type": "parser",
"about": "#2 (en, headers=plain, different label)",
"subject": "Example/P0436/Q.3",
"assert-output": {
"to-contain": [
"<th class=\"with-a-different-Label\">with a different Label</th>"
],
"not-contain": [
"<th class=\"occupation\">occupation</th>"
]
}
},
{
"type": "parser",
"about": "#3 (en, different label, doesn't contain a prefLabel marker)",
"subject": "Example/P0436/Q.4",
"assert-output": {
"to-contain": [
"<th class=\"with-a-different-Label\">",
"title=\"Property:P106\">with a different Label</a>",
"<span class=\"smwttcontent\">occupation of a person; see also field of work (Property:P101)</span></span>"
],
"not-contain": [
"<th class=\"occupation\">occupation</th>",
" <span title=\"P106\"><sup>ᵖ</sup></span>"
]
}
}
],
"settings": {
"wgContLang": "en",
"wgLang": "en"
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}
|