mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
Reworked link priorities
commit_hash:af0eed37e5814230c05ec3e62334770439646838
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"description": "Same ref name (content) used by top-level $-link ($text) and nested non-template $-link ($log_id in actions)",
|
||||
"templates": {
|
||||
"action_text": {
|
||||
"type": "text",
|
||||
"$text": "content",
|
||||
"actions": [
|
||||
{
|
||||
"$log_id": "content",
|
||||
"url": "action://do"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"card": {
|
||||
"log_id": "test",
|
||||
"states": [
|
||||
{
|
||||
"state_id": 0,
|
||||
"div": {
|
||||
"type": "action_text",
|
||||
"content": "button"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"expected": {
|
||||
"card": {
|
||||
"log_id": "test",
|
||||
"states": [
|
||||
{
|
||||
"state_id": 0,
|
||||
"div": {
|
||||
"type": "text",
|
||||
"text": "button",
|
||||
"actions": [
|
||||
{
|
||||
"log_id": "button",
|
||||
"url": "action://do"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"description": "Same ref name (dir) consumed by parent $-link ($orientation) and needed by child template instance ($text)",
|
||||
"templates": {
|
||||
"labeled_container": {
|
||||
"type": "container",
|
||||
"$orientation": "dir",
|
||||
"items": [
|
||||
{
|
||||
"type": "labeled_text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"labeled_text": {
|
||||
"type": "text",
|
||||
"$text": "dir"
|
||||
}
|
||||
},
|
||||
"card": {
|
||||
"log_id": "test",
|
||||
"states": [
|
||||
{
|
||||
"state_id": 0,
|
||||
"div": {
|
||||
"type": "labeled_container",
|
||||
"dir": "vertical"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"expected": {
|
||||
"card": {
|
||||
"log_id": "test",
|
||||
"states": [
|
||||
{
|
||||
"state_id": 0,
|
||||
"div": {
|
||||
"type": "container",
|
||||
"orientation": "vertical",
|
||||
"items": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "vertical"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user