mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
6be220be03
commit_hash:654f07fe9c407a4ff11b700a736dcda77609f3a3
94 lines
1.8 KiB
JSON
94 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",
|
|
"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"
|
|
]
|
|
}
|
|
]
|
|
}
|