mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
12be9e057c
commit_hash:6bfb526d5b6e25edf4e80fd77c93ebe19d1a1b31
95 lines
1.8 KiB
JSON
95 lines
1.8 KiB
JSON
{
|
|
"description": "Set dict variable from variable.",
|
|
"div_data": {
|
|
"card": {
|
|
"log_id": "dict_variable",
|
|
"variables": [
|
|
{
|
|
"name": "dict_var",
|
|
"type": "dict",
|
|
"value": {
|
|
"boolean": true,
|
|
"integer": 1,
|
|
"number": 1.0,
|
|
"string": "value"
|
|
}
|
|
}
|
|
],
|
|
"states": [
|
|
{
|
|
"state_id": 0,
|
|
"div": {
|
|
"type": "text",
|
|
"text": "text"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"cases": [
|
|
{
|
|
"div_actions": [
|
|
{
|
|
"log_id": "check usual action",
|
|
"url": "div-action://set_variable?name=result&value=@{dict_var}"
|
|
}
|
|
],
|
|
"expected": [
|
|
{
|
|
"type": "variable",
|
|
"variable_name": "result",
|
|
"value": {
|
|
"type": "dict",
|
|
"value": {
|
|
"boolean": true,
|
|
"integer": 1,
|
|
"number": 1.0,
|
|
"string": "value"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web"
|
|
]
|
|
},
|
|
{
|
|
"div_actions": [
|
|
{
|
|
"log_id": "check typed action",
|
|
"typed": {
|
|
"type": "set_variable",
|
|
"variable_name": "result",
|
|
"value": {
|
|
"type": "dict",
|
|
"value": "@{dict_var}"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"expected": [
|
|
{
|
|
"type": "variable",
|
|
"variable_name": "result",
|
|
"value": {
|
|
"type": "dict",
|
|
"value": {
|
|
"boolean": true,
|
|
"integer": 1,
|
|
"number": 1.0,
|
|
"string": "value"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web"
|
|
]
|
|
}
|
|
]
|
|
}
|