mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
201be941c9
commit_hash:fd6e36a8ea96d96b9a00bac60a72f213c5f2dc0e
247 lines
6.5 KiB
JSON
247 lines
6.5 KiB
JSON
{
|
|
"description": "TODO: https://nda.ya.ru/t/MMvpmt855oXgre",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web"
|
|
],
|
|
"div_data": {
|
|
"templates": {
|
|
"item_text": {
|
|
"type": "text",
|
|
"width": {
|
|
"type": "wrap_content"
|
|
},
|
|
"height": {
|
|
"type": "wrap_content"
|
|
},
|
|
"paddings": {
|
|
"left": 10,
|
|
"top": 10,
|
|
"right": 10,
|
|
"bottom": 10
|
|
},
|
|
"border": {
|
|
"stroke": {
|
|
"color": "#B2B2B2"
|
|
}
|
|
},
|
|
"font_size": 12,
|
|
"text_alignment_horizontal": "center",
|
|
"text_alignment_vertical": "center"
|
|
}
|
|
},
|
|
"card": {
|
|
"log_id": "tests",
|
|
"variables": [
|
|
{
|
|
"name": "title",
|
|
"type": "string",
|
|
"value": "Container with all separators"
|
|
},
|
|
{
|
|
"name": "separator_show_at_start",
|
|
"type": "boolean",
|
|
"value": true
|
|
},
|
|
{
|
|
"name": "separator_show_at_end",
|
|
"type": "boolean",
|
|
"value": true
|
|
},
|
|
{
|
|
"name": "separator_show_between",
|
|
"type": "boolean",
|
|
"value": true
|
|
}
|
|
],
|
|
"states": [
|
|
{
|
|
"state_id": 1,
|
|
"div": {
|
|
"type": "container",
|
|
"orientation": "vertical",
|
|
"width": {
|
|
"type": "fixed",
|
|
"value": 330
|
|
},
|
|
"height": {
|
|
"type": "wrap_content"
|
|
},
|
|
"background": [
|
|
{
|
|
"type": "solid",
|
|
"color": "#FFFFFF"
|
|
}
|
|
],
|
|
"items": [
|
|
{
|
|
"type": "text",
|
|
"text": "@{title}",
|
|
"paddings": {
|
|
"left": 10,
|
|
"top": 10,
|
|
"right": 10,
|
|
"bottom": 10
|
|
}
|
|
},
|
|
{
|
|
"type": "container",
|
|
"orientation": "horizontal",
|
|
"width": {
|
|
"type": "wrap_content"
|
|
},
|
|
"height": {
|
|
"type": "wrap_content"
|
|
},
|
|
"layout_mode": "no_wrap",
|
|
"content_alignment_horizontal": "center",
|
|
"border": {
|
|
"stroke": {
|
|
"color": "#FF00EE"
|
|
}
|
|
},
|
|
"separator": {
|
|
"show_at_start": "@{separator_show_at_start}",
|
|
"show_at_end": "@{separator_show_at_end}",
|
|
"show_between": "@{separator_show_between}",
|
|
"style": {
|
|
"type": "shape_drawable",
|
|
"shape": {
|
|
"type": "rounded_rectangle",
|
|
"item_width": {
|
|
"type": "fixed",
|
|
"value": 10
|
|
},
|
|
"item_height": {
|
|
"type": "fixed",
|
|
"value": 15
|
|
},
|
|
"corner_radius": {
|
|
"type": "fixed",
|
|
"value": 0
|
|
}
|
|
},
|
|
"color": "#FF0000"
|
|
}
|
|
},
|
|
"items": [
|
|
{
|
|
"type": "item_text",
|
|
"text": "50",
|
|
"width": {
|
|
"type": "fixed",
|
|
"value": 50
|
|
}
|
|
},
|
|
{
|
|
"type": "item_text",
|
|
"text": "100",
|
|
"width": {
|
|
"type": "fixed",
|
|
"value": 100
|
|
}
|
|
},
|
|
{
|
|
"type": "item_text",
|
|
"text": "50",
|
|
"width": {
|
|
"type": "fixed",
|
|
"value": 50
|
|
}
|
|
},
|
|
{
|
|
"type": "item_text",
|
|
"text": "50",
|
|
"width": {
|
|
"type": "fixed",
|
|
"value": 50
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"steps": [
|
|
{
|
|
"expected_screenshot": "step0.png"
|
|
},
|
|
{
|
|
"div_actions": [
|
|
{
|
|
"url": "div-action://set_variable?name=separator_show_between&value=false",
|
|
"log_id": "change_separator"
|
|
},
|
|
{
|
|
"url": "div-action://set_variable?name=title&value=Between%20separators%20were%20disabled",
|
|
"log_id": "change_title"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"div_actions": [
|
|
{
|
|
"url": "div-action://set_variable?name=separator_show_at_start&value=false",
|
|
"log_id": "change_separator"
|
|
},
|
|
{
|
|
"url": "div-action://set_variable?name=title&value=Start%20and%20between%20separators%20were%20disabled",
|
|
"log_id": "change_title"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"div_actions": [
|
|
{
|
|
"url": "div-action://set_variable?name=separator_show_at_end&value=false",
|
|
"log_id": "change_separator"
|
|
},
|
|
{
|
|
"url": "div-action://set_variable?name=title&value=All%20separators%20were%20disabled",
|
|
"log_id": "change_title"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"div_actions": [
|
|
{
|
|
"url": "div-action://set_variable?name=separator_show_between&value=true",
|
|
"log_id": "change_separator"
|
|
},
|
|
{
|
|
"url": "div-action://set_variable?name=title&value=Between%20separators%20were%20enabled",
|
|
"log_id": "change_title"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"div_actions": [
|
|
{
|
|
"url": "div-action://set_variable?name=separator_show_at_start&value=true",
|
|
"log_id": "change_separator"
|
|
},
|
|
{
|
|
"url": "div-action://set_variable?name=title&value=Start%20and%20between%20separators%20were%20enabled",
|
|
"log_id": "change_title"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"div_actions": [
|
|
{
|
|
"url": "div-action://set_variable?name=separator_show_at_end&value=true",
|
|
"log_id": "change_separator"
|
|
},
|
|
{
|
|
"url": "div-action://set_variable?name=title&value=All%20separators%20were%20enabled",
|
|
"log_id": "change_title"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|