You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -164,20 +179,20 @@ defmodule EDDRemindersTest do
164
179
end
165
180
166
181
describe"EDD Reminder"do
167
-
@describetagskip: "TODO: Implement support for Template CSV import etc"
168
182
test"Got it",%{flow: flow}do
169
183
flow
184
+
170
185
|>FlowTester.start()
171
186
|>receive_message(%{
172
-
# text: "[DEBUG]\r\nTemplate edd_reminder_2041 sent with language en_US.\r\nBody parameters: [@name]\r\nMedia link: @image_data.body.meta.download_url" <> _,
173
187
text:
174
-
"[DEBUG]\r\nTemplate @body.whatsapp_template_name sent with language en_US.\r\nBody parameters: [@name]\r\nMedia link: @image_data.body.meta.download_url\r\n\r\nThe buttons represented here are not necessarily the same as the ones in the real template. Please double check the template buttons when running the flow in a real-world scenario."<>
188
+
"[DEBUG]\r\nTemplate @submission_name sent with language en_US.\r\nBody parameters: [@name]\r\nMedia link: @image_data.body.meta.download_url\r\n\r\nThe buttons represented here are not necessarily the same as the ones in the real template. Please double check the template buttons when running the flow in a real-world scenario."<>
175
189
_,
176
-
buttons: [
177
-
{"edd_got_it","edd_got_it"},
178
-
{"edd_month","edd_month"},
179
-
{"eddr_unknown","eddr_unknown"}
180
-
]
190
+
# buttons: [
191
+
# {"edd_got_it", "edd_got_it"},
192
+
# {"edd_month", "edd_month"},
193
+
# {"eddr_unknown", "eddr_unknown"}
194
+
# ]
195
+
# buttons: button_labels(["Got it!", "Update due date", "How to calculate it"]),
181
196
})
182
197
|>FlowTester.send("edd_got_it")
183
198
|>receive_message(%{
@@ -191,15 +206,15 @@ defmodule EDDRemindersTest do
# text: "[DEBUG]\r\nTemplate edd_reminder_2041_pt sent with language pt_PT.\r\nBody parameters: [@name]\r\nMedia link: @image_data.body.meta.download_url" <> _,
195
209
text:
196
-
"[DEBUG]\r\nTemplate @body.whatsapp_template_name sent with language pt_PT.\r\nBody parameters: [@name]\r\nMedia link: @image_data.body.meta.download_url"<>
210
+
"[DEBUG]\r\nTemplate @submission_name sent with language pt_PT.\r\nBody parameters: [@name]\r\nMedia link: @image_data.body.meta.download_url"<>
197
211
_,
198
-
buttons: [
199
-
{"edd_got_it","edd_got_it"},
200
-
{"edd_month","edd_month"},
201
-
{"eddr_unknown","eddr_unknown"}
202
-
]
212
+
# buttons: button_labels(["Got it!", "Update due date", "How to calculate it"])
213
+
# buttons: [
214
+
# {"edd_got_it", "edd_got_it"},
215
+
# {"edd_month", "edd_month"},
216
+
# {"eddr_unknown", "eddr_unknown"}
217
+
# ]
203
218
})
204
219
|>FlowTester.send("edd_got_it")
205
220
|>receive_message(%{
@@ -213,15 +228,16 @@ defmodule EDDRemindersTest do
# text: "[DEBUG]\r\nTemplate edd_reminder_2041 sent with language en_US.\r\nBody parameters: [@name]\r\n\r\nThe buttons represented" <> _,
217
231
text:
218
-
"[DEBUG]\r\nTemplate @body.whatsapp_template_name sent with language en_US.\r\nBody parameters: [@name]\r\n\r\nThe buttons represented here are not necessarily the same as the ones in the real template. Please double check the template buttons when running the flow in a real-world scenario."<>
232
+
"[DEBUG]\r\nTemplate @submission_name sent with language en_US.\r\nBody parameters: [@name]\r\n\r\nThe buttons represented here are not necessarily the same as the ones in the real template. Please double check the template buttons when running the flow in a real-world scenario."<>
# buttons: button_labels(["Got it!", "Update due date", "How to calculate it"])
236
+
# buttons: [
237
+
# {"edd_got_it", "edd_got_it"},
238
+
# {"edd_month", "edd_month"},
239
+
# {"eddr_unknown", "eddr_unknown"}
240
+
# ]
225
241
})
226
242
|>FlowTester.send("edd_got_it")
227
243
|>receive_message(%{
@@ -231,33 +247,34 @@ defmodule EDDRemindersTest do
231
247
end
232
248
233
249
# TODO: Figure out why this doesn't work - it probably has something to do with the fact that we're sending a template
234
-
# test "Got it error", %{flow: flow} do
235
-
# flow
236
-
# |> FlowTester.start()
237
-
# |> receive_message(%{
238
-
# text: "[DEBUG]\r\nTemplate edd_reminder_2041 sent with language en_US.\r\nBody parameters: [@name]\r\nMedia link: @image_data.body.meta.download_url" <> _,
text: "[DEBUG]\r\nTemplate @submission_name sent with language en_US.\r\nBody parameters: [@name]\r\nMedia link: @image_data.body.meta.download_url"<>_,
255
+
# buttons: button_labels(["Got it!", "Update due date", "How to calculate it"]),
# text: "[DEBUG]\r\nTemplate edd_reminder_2041 sent with language en_US.\r\nBody parameters: [@name]\r\nMedia link: @image_data.body.meta.download_url" <> _,
253
269
text:
254
-
"[DEBUG]\r\nTemplate @body.whatsapp_template_name sent with language en_US.\r\nBody parameters: [@name]\r\nMedia link: @image_data.body.meta.download_url\r\n\r\nThe buttons represented here are not necessarily the same as the ones in the real template. Please double check the template buttons when running the flow in a real-world scenario."<>
270
+
"[DEBUG]\r\nTemplate @submission_name sent with language en_US.\r\nBody parameters: [@name]\r\nMedia link: @image_data.body.meta.download_url\r\n\r\nThe buttons represented here are not necessarily the same as the ones in the real template. Please double check the template buttons when running the flow in a real-world scenario."<>
255
271
_,
256
-
buttons: [
257
-
{"edd_got_it","edd_got_it"},
258
-
{"edd_month","edd_month"},
259
-
{"eddr_unknown","eddr_unknown"}
260
-
]
272
+
# buttons: button_labels(["Got it!", "Update due date", "How to calculate it"])
0 commit comments