Files
divkit/test_data/interactive_snapshot_test_data/div-switch/switch-properties.json
T
burstein c99cee1305 Added div-switch in scheme
commit_hash:8603f98382fbe5cefd0cb43e8949940dbb572894
2024-10-25 16:12:45 +03:00

69 lines
1.3 KiB
JSON

{
"description": "Switch properties",
"platforms": [
"ios"
],
"div_data": {
"card": {
"log_id": "tests",
"variables": [
{
"name": "switch_value",
"type": "boolean",
"value": false
},
{
"name": "on_color_var",
"type": "color",
"value": "#FFFFFF"
},
{
"name": "switch_enabled",
"type": "boolean",
"value": true
}
],
"states": [
{
"state_id": 0,
"div": {
"type": "switch",
"is_on_variable": "switch_value",
"is_enabled": "@{switch_enabled}",
"on_color": "@{on_color_var}"
}
}
]
}
},
"steps": [
{
"expected_screenshot": "step0.png"
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=switch_value&value=true",
"log_id": "switch_value"
}
]
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=on_color_var&value=%232a35ad",
"log_id": "change_color"
}
]
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=switch_enabled&value=false",
"log_id": "disable_switch"
}
]
}
]
}