summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0452.json
blob: 19ff739000a544ca885d86d50749ac2405cdf40d (plain)
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
{
	"description": "Test in-text `_txt` datatype in combination with an \"Allows value\" output (#2342, `wgContLang=en`, `wgLang=en`)",
	"setup": [
		{
			"page": "Has text",
			"namespace":"SMW_NS_PROPERTY",
			"contents": "[[Has type::Text]], [[Allows value::Doe]]"
		},
		{
			"page": "Example/P0452/1",
			"namespace":"NS_MAIN",
			"contents": "[[Has text::Doe]]"
		},
		{
			"page": "Example/P0452/2",
			"namespace":"NS_MAIN",
			"contents": "[[Has text::Do]]"
		}
	],
	"tests": [
		{
			"type": "parser",
			"about": "#0 test output of the valid [[Has text::Doe]] annotation",
			"subject": "Example/P0452/1",
			"assert-output": {
				"to-contain": [
					"Doe"
				]
			}
		},
		{
			"type": "parser",
			"about": "#1 (1.31-) test output of the invalid [[Has text::Do]] annotation",
			"skip-on": {
				"mediawiki": [ ">1.30.x", "MediaWiki changed the HTML Tidy" ]
			},
			"subject": "Example/P0452/2",
			"assert-output": {
				"to-contain": [
					"Do<span class=\"smw-highlighter\" data-type=\"4\" data-state=\"inline\" data-title=\"Warning\" title=\"&quot;Do&quot; is not in the list (Doe) of allowed values for the &quot;Has text&quot; property.\">"
				]
			}
		},
		{
			"type": "parser",
			"about": "#1 (1.31+) test output of the invalid [[Has text::Do]] annotation",
			"skip-on": {
				"mediawiki": [ "<1.30.x", "MediaWiki changed the HTML Tidy" ]
			},
			"subject": "Example/P0452/2",
			"assert-output": {
				"to-contain": [
					"Do<span class=\"smw-highlighter\" data-type=\"4\" data-state=\"inline\" data-title=\"Warning\" title=\"&quot;Do&quot; is not in the list (Doe) of allowed values for the &quot;Has text&quot; property.\">"
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLang": "en",
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		}
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}