diff --git a/flows/actions/testdata/send_msg.json b/flows/actions/testdata/send_msg.json index 5451d7679..a4e03a67e 100644 --- a/flows/actions/testdata/send_msg.json +++ b/flows/actions/testdata/send_msg.json @@ -837,5 +837,173 @@ "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" + } + ] + }, + "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" + } + ] + }, + "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": [] + } } + ] \ No newline at end of file