Files
divkit/test_data/interactive_snapshot_test_data/div-pager/select-elements.json
T
babaevmm 201be941c9 fix json format
commit_hash:fd6e36a8ea96d96b9a00bac60a72f213c5f2dc0e
2025-02-07 18:43:40 +03:00

211 lines
4.8 KiB
JSON

{
"description": "TODO: https://nda.ya.ru/t/MMvpmt855oXgre",
"platforms": [
"android",
"ios",
"web"
],
"div_data": {
"templates": {
"text_block": {
"type": "text",
"font_size": 14,
"text_alignment_horizontal": "center",
"text_alignment_vertical": "center",
"alignment_horizontal": "center",
"text_color": "#1ABC9C",
"paddings": {
"top": 4,
"bottom": 4,
"left": 8,
"right": 8
},
"margins": {
"left": 8,
"right": 8
},
"width": {
"type": "fixed",
"value": 80
},
"height": {
"type": "fixed",
"value": 50
},
"background": [
{
"type": "solid",
"color": "#34495E"
}
],
"border": {
"corner_radius": 6
}
}
},
"card": {
"log_id": "tests",
"states": [
{
"state_id": 1,
"div": {
"type": "container",
"orientation": "vertical",
"height": {
"type": "fixed",
"value": 300
},
"width": {
"type": "fixed",
"value": 300
},
"items": [
{
"type": "pager",
"id": "test_pager",
"layout_mode": {
"type": "percentage",
"page_width": {
"type": "percentage",
"value": 80
},
"width": {
"type": "match_parent"
},
"height": {
"type": "match_parent"
}
},
"items": [
{
"type": "text_block",
"text": "Item0",
"width": {
"type": "match_parent"
}
},
{
"type": "text_block",
"text": "Item1",
"width": {
"type": "match_parent"
}
},
{
"type": "text_block",
"text": "Item2",
"width": {
"type": "match_parent"
}
},
{
"type": "text_block",
"text": "Item3",
"width": {
"type": "match_parent"
}
},
{
"type": "text_block",
"text": "Item4",
"width": {
"type": "match_parent"
}
}
]
}
]
}
}
]
}
},
"steps": [
{
"expected_screenshot": "step0.png"
},
{
"div_actions": [
{
"url": "div-action://set_next_item?id=test_pager",
"log_id": "second item"
}
],
"delay": 500
},
{
"div_actions": [
{
"url": "div-action://set_previous_item?id=test_pager",
"log_id": "first item"
}
],
"delay": 500
},
{
"div_actions": [
{
"url": "div-action://set_previous_item?id=test_pager&overflow=clamp",
"log_id": "first item"
}
],
"delay": 500
},
{
"div_actions": [
{
"url": "div-action://set_previous_item?id=test_pager&overflow=ring",
"log_id": "last item"
}
],
"delay": 500
},
{
"div_actions": [
{
"url": "div-action://set_next_item?id=test_pager&overflow=clamp",
"log_id": "last item"
}
],
"delay": 500
},
{
"div_actions": [
{
"url": "div-action://set_next_item?id=test_pager&overflow=ring",
"log_id": "first item"
}
],
"delay": 500
},
{
"div_actions": [
{
"url": "div-action://set_current_item?id=test_pager&item=2",
"log_id": "middle item"
}
],
"delay": 500
},
{
"div_actions": [
{
"url": "div-action://set_current_item?id=test_pager&item=-1",
"log_id": "middle (nonexistent) item"
}
],
"delay": 500
},
{
"div_actions": [
{
"url": "div-action://set_current_item?id=test_pager&item=0",
"log_id": "first item"
}
],
"expected_screenshot": "step0.png",
"delay": 500
}
]
}