mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
95 lines
2.0 KiB
JSON
95 lines
2.0 KiB
JSON
{
|
|
"description": "Test DivSelect switching visibility",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web"
|
|
],
|
|
"div_data": {
|
|
"card": {
|
|
"log_id": "tests",
|
|
"variables": [
|
|
{
|
|
"name": "value_variable",
|
|
"type": "string",
|
|
"value": "initial_value"
|
|
},
|
|
{
|
|
"name": "visibility",
|
|
"type": "string",
|
|
"value": "visible"
|
|
}
|
|
],
|
|
"states": [
|
|
{
|
|
"state_id": 0,
|
|
"div": {
|
|
"type": "select",
|
|
"options": [
|
|
{
|
|
"value": "initial_value"
|
|
}
|
|
],
|
|
"width": {
|
|
"type": "match_parent"
|
|
},
|
|
"height": {
|
|
"type": "wrap_content"
|
|
},
|
|
"paddings": {
|
|
"left": 16,
|
|
"top": 16,
|
|
"right": 16,
|
|
"bottom": 16
|
|
},
|
|
"margins": {
|
|
"left": 16,
|
|
"top": 16,
|
|
"right": 16,
|
|
"bottom": 16
|
|
},
|
|
"border": {
|
|
"corner_radius": 8,
|
|
"stroke": {
|
|
"color": "#0000FF"
|
|
}
|
|
},
|
|
"visibility": "@{visibility}",
|
|
"value_variable": "value_variable"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"steps": [
|
|
{
|
|
"expected_screenshot": "step0.png"
|
|
},
|
|
{
|
|
"div_actions": [
|
|
{
|
|
"url": "div-action://set_variable?name=visibility&value=invisible",
|
|
"log_id": "invisible"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"div_actions": [
|
|
{
|
|
"url": "div-action://set_variable?name=visibility&value=gone",
|
|
"log_id": "gone"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"div_actions": [
|
|
{
|
|
"url": "div-action://set_variable?name=visibility&value=visible",
|
|
"log_id": "restore: visible"
|
|
}
|
|
],
|
|
"expected_screenshot": "step0.png"
|
|
}
|
|
]
|
|
}
|