Files
divkit/test_data/regression_test_data/input/input_is_enabled.json
T
grechka62 a5400ddd0e Add regression case for input cursor
commit_hash:469c743d2f3e4242b31bc9be469661948af83bcd
2026-02-03 16:42:12 +03:00

117 lines
2.9 KiB
JSON

{
"card": {
"log_id": "input",
"variables": [
{
"name": "multiline_input_value",
"type": "string",
"value": "Multiline\ntext"
},
{
"name": "singleline_input_value",
"type": "string",
"value": "Singleline text"
},
{
"name": "is_input_enabled",
"type": "boolean",
"value": true
}
],
"states": [
{
"state_id": 0,
"div": {
"type": "container",
"items": [
{
"type": "input",
"is_enabled": "@{is_input_enabled}",
"margins": {
"left": 16,
"top": 16,
"right": 16,
"bottom": 16
},
"paddings": {
"left": 16,
"top": 16,
"right": 16,
"bottom": 16
},
"background": [
{
"type": "solid",
"color": "#0e000000"
}
],
"border": {
"corner_radius": 8
},
"text_variable": "multiline_input_value"
},
{
"type": "input",
"is_enabled": "@{is_input_enabled}",
"keyboard_type": "single_line_text",
"margins": {
"left": 16,
"right": 16,
"bottom": 16
},
"paddings": {
"left": 16,
"top": 16,
"right": 16,
"bottom": 16
},
"background": [
{
"type": "solid",
"color": "#0e000000"
}
],
"border": {
"corner_radius": 8
},
"text_variable": "singleline_input_value"
},
{
"type": "text",
"text": "@{is_input_enabled ? 'Disable' : 'Enable'}",
"margins": {
"left": 16,
"right": 16,
"bottom": 16
},
"paddings": {
"left": 16,
"top": 16,
"right": 16,
"bottom": 16
},
"background": [
{
"type": "solid",
"color": "#0077FF"
}
],
"text_color": "#ffffff",
"border": {
"corner_radius": 8
},
"text_alignment_horizontal": "center",
"actions": [
{
"log_id": "toogle_enabled",
"url": "div-action://set_variable?name=is_input_enabled&value=@{!is_input_enabled}"
}
]
}
]
}
}
]
}
}