Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
norkans7 committed Dec 7, 2023
1 parent 55cc248 commit 62b2311
Showing 1 changed file with 196 additions and 0 deletions.
196 changes: 196 additions & 0 deletions flows/actions/testdata/send_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -837,5 +837,201 @@
"waiting_exits": [],
"parent_refs": []
}
},
{
"description": "Use template translation with attachments and quick replies and localized",
"action": {
"type": "send_msg",
"uuid": "ad154980-7bf7-4ab8-8728-545fd6378912",
"text": "Hi Ryan Lewis, who's a good boy?",
"attachments": [
"image:http://example.com/red.jpg"
],
"quick_replies": [
"Yes",
"No"
],
"templating": {
"uuid": "9c4bf5b5-3aa4-48ec-9bb9-424a9cbc6785",
"params": {
"header": [
{
"type": "image",
"uuid": "98788f6d-775e-4c6c-a11c-d6169c3551c1",
"value": "no_used"
}
],
"body": [
{
"type": "text",
"uuid": "74d59988-18c0-4919-9cb4-9f9e3847ed50",
"value": "@contact.name"
},
{
"type": "text",
"uuid": "f383e94d-0598-4fd9-81d7-f0aea397d63b",
"value": "boy"
}
],
"button.1": [
{
"type": "text",
"uuid": "31cd12f7-5a8d-4421-a289-d47cdfb7cff1",
"value": "no_used"
}
],
"button.2": [
{
"type": "text",
"uuid": "67ed8f42-4fce-4e8a-b788-8a7afc9b02ea",
"value": "no_used"
}
]
},
"template": {
"uuid": "5722e1fd-fe32-4e74-ac78-3cf41a6adb7e",
"name": "affirmation"
},
"variables": [
"@contact.name",
"boy"
]
}
},
"localization": {
"spa": {
"ad154980-7bf7-4ab8-8728-545fd6378912": {
"text": [
"Hola!"
],
"attachments": [
"image:http://example.com/rojo.jpg"
],
"quick_replies": [
"Si",
"No"
]
},
"9c4bf5b5-3aa4-48ec-9bb9-424a9cbc6785": {
"variables": [
"@contact.name",
"niño"
]
},
"f383e94d-0598-4fd9-81d7-f0aea397d63b": {
"value": ["niño"]
},
"74d59988-18c0-4919-9cb4-9f9e3847ed50": {
"value": ["@contact.name"]
}
}
},
"events": [
{
"type": "msg_created",
"created_on": "2018-10-18T14:20:30.000123456Z",
"step_uuid": "59d74b86-3e2f-4a93-aece-b05d2fdcde0c",
"msg": {
"uuid": "9688d21d-95aa-4bed-afc7-f31b35731a3d",
"urn": "tel:+12065551212?channel=57f1078f-88aa-46f4-a59a-948a5739c03d&id=123",
"channel": {
"uuid": "57f1078f-88aa-46f4-a59a-948a5739c03d",
"name": "My Android Phone"
},
"text": "Hola Ryan Lewis, quien es un niño excelente?",
"attachments": [
"image:http://example.com/rojo.jpg"
],
"quick_replies": [
"Si",
"No"
],
"templating": {
"params": {
"body": [
{
"type": "text",
"uuid": "74d59988-18c0-4919-9cb4-9f9e3847ed50",
"value": "Ryan Lewis"
},
{
"type": "text",
"uuid": "f383e94d-0598-4fd9-81d7-f0aea397d63b",
"value": "niño"
}

],
"header": [
{
"type": "image",
"uuid": "98788f6d-775e-4c6c-a11c-d6169c3551c1",
"value": "http://example.com/rojo.jpg"
}
],
"button.1": [
{
"type": "text",
"uuid": "31cd12f7-5a8d-4421-a289-d47cdfb7cff1",
"value": "Si"
}
],
"button.2": [
{
"type": "text",
"uuid": "67ed8f42-4fce-4e8a-b788-8a7afc9b02ea",
"value": "No"
}
]
},
"template": {
"uuid": "5722e1fd-fe32-4e74-ac78-3cf41a6adb7e",
"name": "affirmation"
},
"variables": [
"Ryan Lewis",
"niño"
],
"namespace": ""
},
"locale": "spa"
}
}
],
"templates": [
"Hi Ryan Lewis, who's a good boy?",
"Hola!",
"image:http://example.com/red.jpg",
"image:http://example.com/rojo.jpg",
"Yes",
"No",
"Si",
"No",
"@contact.name",
"boy",
"@contact.name",
"niño"
],
"localizables": [
"Hi Ryan Lewis, who's a good boy?",
"image:http://example.com/red.jpg",
"Yes",
"No",
"@contact.name",
"boy"
],
"inspection": {
"dependencies": [
{
"uuid": "5722e1fd-fe32-4e74-ac78-3cf41a6adb7e",
"name": "affirmation",
"type": "template"
}
],
"issues": [],
"results": [],
"waiting_exits": [],
"parent_refs": []
}
}

]

0 comments on commit 62b2311

Please sign in to comment.