Add modica custom channel integration tests for NZ staging and AS development#4022
Draft
Add modica custom channel integration tests for NZ staging and AS development#4022
Conversation
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for modica integration tests
Add modica custom channel integration tests for NZ staging and AS development
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
integrationTestRunnersupport for the modica custom channel, targeting NZ staging and AS development accounts. Follows the existing instagram test pattern.New:
modica.tshelper modulesendModicaMessage: POSTs to themodicaToFlexwebhook withtestSessionIdso replies route to the test webhook receiver instead of the real Modica APIexpectModicaMessageReceived: Verifies the webhook receiver captured a message matchingdestination === +<senderNumber>andcontent === messageText(mirrorsflexToModica'ssanitizeRecipientIdbehavior)111<session-digits>to satisfy NZ staging'sregex_allowed_test_numbers = "modica:111\\d{1,20}"country check/${NODE_ENV}/modica/${accountSid}/app_nameNew:
integrationTests/nz/modicaCustomChannelChatbot.test.tsChat script inferred from
twilio-iac/helplines/nz/configs/lex_v2/en_NZ/bots/pre_survey.json— Youthline greeting → urgent support Y/N slot → closing message (no integration test completion message since NZ'smessaging-lex-priority-v3studio flow doesn't include that check).New:
integrationTests/as/modicaCustomChannelChatbot.test.tsUses the same script as the existing AS instagram test (same lex pre-survey bot, same studio flow template with integration test completion message).
Checklist
Other Related Issues
None
Verification steps
Run the integration tests against NZ staging and AS development environments:
testFilter = "nz/modicaCustomChannelChatbot"testFilter = "as/modicaCustomChannelChatbot"AFTER YOU MERGE
You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.