summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticResultFormats/tests/phpunit/Integration/JSONScript/TestCases/outline-02.json
blob: d9122f8d0bcc084a77f8afcd90b7c3e4395c8063 (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
95
96
97
98
99
100
101
102
103
104
105
{
	"description": "Test `format=outline` list output",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Assigned to",
			"contents": "[[Has type::Text]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Severity",
			"contents": "[[Has type::Text]]"
		},
		{
			"page": "SRF/Outline/1",
			"contents": "[[Assigned to::John]] [[Severity::Normal]] [[Category:Outline]]"
		},
		{
			"page": "SRF/Outline/2",
			"contents": "[[Assigned to::Jane]] [[Severity::Urgent]] [[Category:Outline]]"
		},
		{
			"page": "SRF/Outline/3",
			"contents": "[[Assigned to::田中]] [[Severity::Urgent]] [[Category:Outline]]"
		},
		{
			"page": "SRF/Outline/Q.1",
			"contents": "{{#ask: [[Category:Outline]] |?Severity |?Assigned to |format=outline |sort=Severity,Assigned to |outlineproperties=Severity |link=none }}"
		},
		{
			"page": "SRF/Outline/Q.2",
			"contents": "{{#ask: [[Category:Outline]] |?Severity |?Assigned to |format=outline |sort=Severity,Assigned to |outlineproperties=Severity,Assigned to |link=none }}"
		}
	],
	"tests": [
		{
			"type": "parser",
			"about": "#0 (`outlineproperties=Severity`)",
			"subject": "SRF/Outline/Q.1",
			"assert-output": {
				"to-contain": [
					"<p style=\"font-size: small; font-weight: bold;\">Normal</p>",
					"<ul>",
					"<li>SRF/Outline/1 (Assigned to John)</li>",
					"</ul>",
					"<ul>",
					"</ul>",
					"<p style=\"font-size: small; font-weight: bold;\">Urgent</p>",
					"<ul>",
					"<li>SRF/Outline/2 (Assigned to Jane)</li>",
					"<li>SRF/Outline/3 (Assigned to 田中)</li>",
					"</ul>",
					"<ul>",
					"</ul>"
				]
			}
		},
		{
			"type": "parser",
			"about": "#1 (`outlineproperties=Severity,Assigned to`)",
			"subject": "SRF/Outline/Q.2",
			"assert-output": {
				"to-contain": [
					"<p style=\"font-size: medium; font-weight: regular;\">Normal</p>",
					"<ul>",
					"<p style=\"font-size: small; font-weight: bold;\">John</p>",
					"<ul>",
					"<li>SRF/Outline/1</li>",
					"</ul>",
					"<ul>",
					"</ul>",
					"</ul>",
					"<p style=\"font-size: medium; font-weight: regular;\">Urgent</p>",
					"<ul>",
					"<p style=\"font-size: small; font-weight: bold;\">Jane</p>",
					"<ul>",
					"<li>SRF/Outline/2</li>",
					"</ul>",
					"<ul>",
					"</ul>",
					"<p style=\"font-size: small; font-weight: bold;\">田中</p>",
					"<ul>",
					"<li>SRF/Outline/3</li>",
					"</ul>",
					"<ul>",
					"</ul>",
					"</ul>"
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLang": "en",
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		}
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}