Another link resolution fix

commit_hash:71aa042987af2b242632f1f161811b7a9bb54b33
This commit is contained in:
booster
2026-03-26 00:53:07 +03:00
parent 518e0a50dd
commit 0dd0aca183
4 changed files with 128 additions and 2 deletions
@@ -0,0 +1,61 @@
{
"description": "Link (titleTextRef) exist in the middle of template resolution chain (nested_container)",
"templates": {
"root_container": {
"type": "container",
"items": [
{
"type": "nested_container"
}
]
},
"nested_container": {
"type": "container",
"items": [
{
"type": "title_text",
"$text": "titleTextRef"
}
]
},
"title_text": {
"type": "text"
}
},
"card": {
"log_id": "test",
"states": [
{
"state_id": 0,
"div": {
"titleTextRef": "Title Text",
"type": "root_container"
}
}
]
},
"expected": {
"card": {
"log_id": "test",
"states": [
{
"state_id": 0,
"div": {
"type": "container",
"items": [
{
"type": "container",
"items": [
{
"text": "Title Text",
"type": "text"
}
]
}
]
}
}
]
}
}
}
@@ -0,0 +1,60 @@
{
"description": "Link (image_start) not for direct property of text, but for nested properties (images)",
"card": {
"log_id": "test",
"states": [
{
"state_id": 0,
"div": {
"image_start": 5,
"type": "root_container"
}
}
]
},
"templates": {
"title_text": {
"type": "text"
},
"root_container": {
"type": "container",
"items": [
{
"text": "Title",
"images": [
{
"$start": "image_start",
"url": "https://yastatic.net/s3/home/divkit/chess.png"
}
],
"type": "title_text"
}
]
}
},
"expected": {
"card": {
"log_id": "test",
"states": [
{
"state_id": 0,
"div": {
"type": "container",
"items": [
{
"text": "Title",
"images": [
{
"start": 5,
"url": "https://yastatic.net/s3/home/divkit/chess.png"
}
],
"type": "text"
}
]
}
}
]
}
}
}