mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
added new regression case for gallery scroll
added new regression case for gallery scroll
This commit is contained in:
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user