From c517061d9a370fac4902c54ebcd6574eb04b3d17 Mon Sep 17 00:00:00 2001 From: Markus <92986684+gesinn-it-wam@users.noreply.github.com> Date: Wed, 1 Mar 2023 17:20:29 +0100 Subject: [PATCH] Added test for #47 --- .../TestCases/display_parameters.json | 48 +++++++++++++++++-- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/Integration/JSONScript/TestCases/display_parameters.json b/tests/phpunit/Integration/JSONScript/TestCases/display_parameters.json index 1646793e..7fcfdeba 100644 --- a/tests/phpunit/Integration/JSONScript/TestCases/display_parameters.json +++ b/tests/phpunit/Integration/JSONScript/TestCases/display_parameters.json @@ -1,22 +1,38 @@ { "description": "display parameters", "setup": [ + { + "namespace": "SMW_NS_PROPERTY", + "page": "Text", + "contents": "[[Has type::Text]]" + }, { "namespace": "NS_CATEGORY", - "page": "Category1", + "page": "WithCaption", "contents": "{{#drilldowninfo: display parameters=caption=THIS IS THE CAPTION}}" }, + { + "namespace": "NS_CATEGORY", + "page": "WithMainColumn", + "contents": "{{#drilldowninfo: display parameters=format=plainlist;headers=hide;?Text}}" + }, + { + "namespace": "NS_CATEGORY", + "page": "WithoutMainColumn", + "contents": "{{#drilldowninfo: display parameters=format=plainlist;headers=hide;?Text;mainlabel=-}}" + }, { "page": "Page1", - "contents": "[[Category:Category1]]" - } ], + "contents": "[[Category:WithCaption]] [[Category:WithMainColumn]] [[Category:WithoutMainColumn]] [[Text::MARKER TEXT]]" + } + ], "tests": [ { "type": "special", "about": "Caption and results are wrapped in corresponding divs", "special-page": { "page": "BrowseData", - "query-parameters": "Category1", + "query-parameters": "WithCaption", "request-parameters": {} }, "assert-output": { @@ -26,6 +42,30 @@ "
" ] } + }, + { + "type": "special", + "about": "The main column as shown by default", + "special-page": { + "page": "BrowseData", + "query-parameters": "WithMainColumn", + "request-parameters": {} + }, + "assert-output": { + "to-contain": "

Page1 (MARKER TEXT)" + } + }, + { + "type": "special", + "about": "The main column as removed with mainlabel=- as expected", + "special-page": { + "page": "BrowseData", + "query-parameters": "WithoutMainColumn", + "request-parameters": {} + }, + "assert-output": { + "to-contain": "

MARKER TEXT" + } } ], "settings": {