Files
divkit/test_data/integration_test_data/decl_expressions_nesting.json
burstein d919b980ee Supported expressions in variable value field
commit_hash:a341b70bacca741f0cb6ea2f600cc4794c8b36a4
2025-05-15 03:57:55 +03:00

78 lines
1.6 KiB
JSON

{
"description": "Decl local variable with expression, using card variable.",
"div_data": {
"card": {
"log_id": "decl_expressions",
"variables": [
{
"name": "val",
"type": "integer",
"value": 3
},
{
"name": "step",
"type": "integer",
"value": -1
}
],
"states": [
{
"state_id": 0,
"div": {
"type": "text",
"text": "text",
"variables": [{
"name": "val",
"type": "integer",
"value": "@{val * 2}"
}],
"variable_triggers": [
{
"condition": "@{step == 0}",
"actions": [
{
"log_id": "step 0",
"typed": {
"type": "set_variable",
"variable_name": "result",
"value": {
"type": "integer",
"value": "@{val}"
}
}
}
]
}
]
}
}
]
}
},
"cases": [
{
"div_actions": [
{
"log_id": "run_setter",
"url": "div-action://set_variable?name=step&value=0"
}
],
"expected": [
{
"type": "variable",
"variable_name": "result",
"value": {
"type": "integer",
"value": 6
}
}
],
"platforms": [
"android",
"ios",
"web"
]
}
]
}