summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-1005.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-1005.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-1005.json53
1 files changed, 53 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-1005.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-1005.json
new file mode 100644
index 00000000..0a371487
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-1005.json
@@ -0,0 +1,53 @@
+{
+ "description": "Test property page with parameters/sort",
+ "setup": [
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has page test",
+ "contents": "[[Has type::Page]]"
+ },
+ {
+ "page": "Example/P1005/A",
+ "contents": "[[Has page test::Sort]] {{DEFAULTSORT:XXX}}"
+ },
+ {
+ "page": "Example/P1005/B",
+ "contents": "[[Has page test::Sort]] {{DEFAULTSORT:AAA}}"
+ }
+ ],
+ "tests": [
+ {
+ "type": "parser",
+ "about": "#0 (use a filter with correct sorting )",
+ "namespace": "SMW_NS_PROPERTY",
+ "subject": "Has page test",
+ "assert-output": {
+ "onPageView": {
+ "parameters": {
+ "filter": "Sort"
+ }
+ },
+ "to-contain": [
+ "<div class=\"smw-table-cell header-title\"><div id=\"A\">A</div>.*<div class=\"smw-table-cell smwpropname\" data-list-index=\"0\"><a href=\".*/Example/P1005/B\" title=\"Example/P1005/B\">Example/P1005/B</a>",
+ "<div class=\"smw-table-cell header-title\"><div id=\"X\">X</div>.*<div class=\"smw-table-cell smwpropname\" data-list-index=\"1\"><a href=\".*/Example/P1005/A\" title=\"Example/P1005/A\">Example/P1005/A</a>"
+ ]
+ }
+ }
+ ],
+ "settings": {
+ "wgContLang": "en",
+ "wgLang": "en",
+ "smwgPageSpecialProperties": [
+ "_MDAT"
+ ],
+ "smwgNamespacesWithSemanticLinks": {
+ "NS_MAIN": true,
+ "SMW_NS_PROPERTY": true
+ }
+ },
+ "meta": {
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+}