From 45e3209dcfe6f7ccfd83c1c28d343dfdba01a241 Mon Sep 17 00:00:00 2001 From: edubinskaya Date: Thu, 10 Nov 2022 19:31:18 +0300 Subject: [PATCH] added new regression case for gallery scroll added new regression case for gallery scroll --- .../gallery/gallery-items-posing.json | 138 ++++++++++++++++++ test_data/regression_test_data/index.json | 14 ++ 2 files changed, 152 insertions(+) create mode 100644 test_data/regression_test_data/gallery/gallery-items-posing.json diff --git a/test_data/regression_test_data/gallery/gallery-items-posing.json b/test_data/regression_test_data/gallery/gallery-items-posing.json new file mode 100644 index 000000000..3697e5bf1 --- /dev/null +++ b/test_data/regression_test_data/gallery/gallery-items-posing.json @@ -0,0 +1,138 @@ +{ + "templates": { + "text_block": { + "type": "text", + "border": { + "corners_radius": { + "top-right": 8, + "top-left": 8 + } + }, + "background": [ + { + "color": "#0e000000", + "type": "solid" + } + ], + "font_size": 20, + "text_alignment_vertical": "center", + "text_alignment_horizontal": "center", + "text_color": "#000000", + "width": { + "type": "fixed", + "value": 240 + }, + "height": { + "type": "fixed", + "value": 200 + } + }, + "text_14_18_regular": { + "type": "text", + "font_size": 14, + "line_height": 18, + "$text": "text_14_18_regular__text", + "$text_color": "text_14_18_regular__text_color", + "margins": { + "left": 12, + "right": 12 + } + } + }, + "card": { + "log_id": "gallery-paging", + "states": [ + { + "state_id": 0, + "div": { + "type": "container", + "width": { + "type": "fixed", + "value": 300 + }, + "border": { + "corner_radius": 16, + "stroke": { + "color": "#1F000000", + "width": 1 + } + }, + "alignment_horizontal": "center", + "margins": { + "left": 8, + "top": 8, + "right": 8, + "bottom": 8 + }, + "orientation": "vertical", + "items": [ + { + "type": "gallery", + "width": { + "type": "match_parent" + }, + "height": { + "type": "wrap_content" + }, + "paddings": { + "left": 4, + "right": 200 + }, + "scroll_mode": "paging", + "items": [ + { + "type": "text_block", + "text": "Item 0" + }, + { + "type": "text_block", + "text": "Item 1" + }, + { + "type": "text_block", + "text": "Item 2" + }, + { + "type": "text_block", + "text": "Item 3" + } + ] + }, + { + "width": { + "type": "fixed", + "value": 240 + }, + "margins": { + "left": 4, + "bottom": 8 + }, + "background": [ + { + "type": "solid", + "color": "#0e000000" + } + ], + "border": { + "corners_radius": { + "bottom-right": 8, + "bottom-left": 8 + } + }, + "alignment_vertical": "center", + "type": "text_14_18_regular", + "paddings": { + "left": 8, + "top": 8, + "right": 8, + "bottom": 8 + }, + "text_alignment_horizontal": "center", + "text": "CORRECT ITEM POSITION" + } + ] + } + } + ] + } +} \ No newline at end of file diff --git a/test_data/regression_test_data/index.json b/test_data/regression_test_data/index.json index 345305a58..d5f810683 100644 --- a/test_data/regression_test_data/index.json +++ b/test_data/regression_test_data/index.json @@ -1389,6 +1389,20 @@ "Two pagers with indicator of different shapes - Rounded Rectangle and Circle" ], "file": "indicator_shapes.json" + }, + { + "title": "Gallery items posing", + "tags": [ + "DivGallery" + ], + "steps": [ + "Scroll the items to the gallery end", + "Try to scroll again" + ], + "expected_results": [ + "Current item always stick to the text" + ], + "file": "gallery/gallery-items-posing.json" } ] }