diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0302.json')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0302.json | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0302.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0302.json new file mode 100644 index 00000000..6e82788a --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0302.json @@ -0,0 +1,108 @@ +{ + "description": "Test `format=category` and defaultsort (#699, en)", + "setup": [ + { + "namespace": "SMW_NS_PROPERTY", + "page": "Has text", + "contents": "[[Has type::Text]]" + }, + { + "page": "Saaa", + "contents": "[[Has text::aaa]] [[Has text::aba]] [[Has text::abb]]" + }, + { + "page": "Sbaa", + "contents": "[[Has text::baa]] {{DEFAULTSORT:Saba}}" + }, + { + "page": "Scba", + "contents": "[[Has text::cba]] [[Has text::01]] [[Has text::10]]" + }, + { + "page": "Seba", + "contents": "[[Has text::eba]]" + }, + { + "page": "Seoa", + "contents": "[[Has text::eoa]] {{DEFAULTSORT:Saca}}" + }, + { + "page": "Soaa", + "contents": "[[Has text::oaa]]" + }, + { + "page": "one-column-plainlist-output-asc", + "contents": "{{#ask:[[Has text::+]]\n |?Has text\n |format=category\n |order=asc\n |link=none\n |headers=plain\n |delim=;\n |limit=10\n |columns=1\n}}" + }, + { + "page": "one-column-plainlist-output-desc", + "contents": "{{#ask:[[Has text::+]]\n |?Has text\n |format=category\n |order=desc\n |link=none\n |headers=plain\n |limit=10\n |columns=1\n}}" + }, + { + "page": "Example/0302/Further-link", + "contents": "{{#ask:[[Has text::+]]\n |?Has text\n |format=category\n |order=desc\n |link=none\n |headers=plain\n |limit=0\n |columns=1\n}}" + } + ], + "tests": [ + { + "type": "format", + "about": "#0", + "subject": "one-column-plainlist-output-asc", + "assert-output": { + "to-contain": [ + "<div class=\"smw-columnlist-container\" dir=\"ltr\">", + "<div class=\"smw-column-header\">S</div><ul>", + "<li>Saaa (Has text aaa; aba; abb)</li>", + "<li>Sbaa (Has text baa)</li>", + "<li>Seoa (Has text eoa)</li>", + "<li>Scba (Has text 01; 10; cba)</li>", + "<li>Seba (Has text eba)</li>", + "<li>Soaa (Has text oaa)</li></ul></div>", + "<br style=\"clear: both;\" />" + ] + } + }, + { + "type": "format", + "about": "#1", + "subject": "one-column-plainlist-output-desc", + "assert-output": { + "to-contain": [ + "<div class=\"smw-columnlist-container\" dir=\"ltr\">", + "<div class=\"smw-column-header\">S</div><ul>", + "<li>Soaa (Has text oaa)</li>", + "<li>Seba (Has text eba)</li>", + "<li>Scba (Has text 01, 10, cba)</li>", + "<li>Seoa (Has text eoa)</li>", + "<li>Sbaa (Has text baa)</li>", + "<li>Saaa (Has text aaa, aba, abb)</li></ul></div>", + "<br style=\"clear: both;\" />" + ] + } + }, + { + "type": "format", + "about": "#3 Further link", + "subject": "Example/0302/Further-link", + "assert-output": { + "to-contain": [ + "<span class=\"smw-category-furtherresults\">", + "Special:Ask/-5B-5BHas-20text::+-5D-5D/-3FHas-20text/mainlabel=/order=desc/sort=/offset=0/format=category/link=none/headers=plain/columns=1" + ] + } + } + ], + "settings": { + "wgContLang": "en", + "wgLang": "en", + "smwgNamespacesWithSemanticLinks": { + "NS_MAIN": true, + "SMW_NS_PROPERTY": true + } + }, + "meta": { + "version": "2", + "is-incomplete": false, + "debug": false + } +}
\ No newline at end of file |