summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0028.json
blob: 43ace00c4e204b2e55d3293fb4fcbe7cea71c26a (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
	"description": "Test `Special:Browse` limited value list",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has page",
			"contents": "[[Has type::Page]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has text",
			"contents": "[[Has type::Text]]"
		},
		{
			"page": "Example/S0028/1",
			"contents": "[[Has text::S1]], [[Has text::S2]], [[Has text::S3]], [[Has text::S4]], [[Has text::S5]], [[Has text::S6]]"
		},
		{
			"page": "Example/S0028/2",
			"contents": "[[Has page::Example/S0028/5]]"
		},
		{
			"page": "Example/S0028/3",
			"contents": "[[Has page::Example/S0028/5]]"
		},
		{
			"page": "Example/S0028/4",
			"contents": "[[Has page::Example/S0028/5]]"
		}
	],
	"tests": [
		{
			"type": "special",
			"about": "#0 (limited outgoing value list)",
			"special-page": {
				"page": "Browse",
				"query-parameters": "Example/S0028/1",
				"request-parameters": {
					"output": "legacy",
					"valuelistlimit-out": 5
				}
			},
			"assert-output": {
				"to-contain": [
					"<span class=\"smwb-value\">S1",
					"<span class=\"smwb-value\">S2",
					"<span class=\"smwb-value\">S3",
					"<span class=\"smwb-value\">S4",
					"<span class=\"smwb-value\">S5"
				],
				"not-contain": [
					"<span class=\"smwb-value\">S6"
				]
			}
		},
		{
			"type": "special",
			"about": "#1 (limited incoming value list)",
			"special-page": {
				"page": "Browse",
				"query-parameters": "Example/S0028/5",
				"request-parameters": {
					"output": "legacy",
					"valuelistlimit-in": 3
				}
			},
			"assert-output": {
				"to-contain": [
					"<span class=\"smwb-ivalue\"><a href=\".*/Example/S0028/2\"",
					"<span class=\"smwb-ivalue\"><a href=\".*/Example/S0028/3\""
				],
				"not-contain": [
					"<span class=\"smwb-ivalue\"><a href=\".*/Example/S0028/4\""
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLang": "en",
		"smwgPageSpecialProperties": [
			"_MDAT"
		],
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		}
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}