From 46c9df2a932297fb004c91c2ef9af3554ad95d3c Mon Sep 17 00:00:00 2001 From: Georg Osang Date: Tue, 11 Oct 2022 16:16:38 +0200 Subject: [PATCH] more tests for send_msg action (quick replies, attachments) --- .../actions/send_msg_with_attachments.json | 21 +++++++++++++++++++ .../actions/send_msg_with_quick_replies.json | 21 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 rapidpro/tests/data/actions/send_msg_with_attachments.json create mode 100644 rapidpro/tests/data/actions/send_msg_with_quick_replies.json diff --git a/rapidpro/tests/data/actions/send_msg_with_attachments.json b/rapidpro/tests/data/actions/send_msg_with_attachments.json new file mode 100644 index 0000000..82dd77d --- /dev/null +++ b/rapidpro/tests/data/actions/send_msg_with_attachments.json @@ -0,0 +1,21 @@ +{ + "type": "send_msg", + "uuid": "8eebd020-1af5-431c-b943-aa670fc74da9", + "text": "Hi @contact.name, are you ready to complete today's survey?", + "templating": { + "uuid": "32c2ead6-3fa3-4402-8e27-9cc718175c5a", + "template": { + "uuid": "3ce100b7-a734-4b4e-891b-350b1279ade2", + "name": "revive_issue" + }, + "variables": [ + "@contact.name" + ] + }, + "topic": "event", + "attachments": [ + "image:image url", + "audio:audio url" + ], + "quick_replies": [] +} \ No newline at end of file diff --git a/rapidpro/tests/data/actions/send_msg_with_quick_replies.json b/rapidpro/tests/data/actions/send_msg_with_quick_replies.json new file mode 100644 index 0000000..e8038ba --- /dev/null +++ b/rapidpro/tests/data/actions/send_msg_with_quick_replies.json @@ -0,0 +1,21 @@ +{ + "type": "send_msg", + "uuid": "8eebd020-1af5-431c-b943-aa670fc74da9", + "text": "Hi @contact.name, are you ready to complete today's survey?", + "templating": { + "uuid": "32c2ead6-3fa3-4402-8e27-9cc718175c5a", + "template": { + "uuid": "3ce100b7-a734-4b4e-891b-350b1279ade2", + "name": "revive_issue" + }, + "variables": [ + "@contact.name" + ] + }, + "topic": "event", + "attachments": [], + "quick_replies": [ + "qr1", + "qr2" + ] +} \ No newline at end of file