Skip to content

Add modica custom channel integration tests for NZ staging and AS development#4022

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/add-modica-integration-tests
Draft

Add modica custom channel integration tests for NZ staging and AS development#4022
Copilot wants to merge 3 commits intomasterfrom
copilot/add-modica-integration-tests

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

Description

Adds integrationTestRunner support for the modica custom channel, targeting NZ staging and AS development accounts. Follows the existing instagram test pattern.

New: modica.ts helper module

  • sendModicaMessage: POSTs to the modicaToFlex webhook with testSessionId so replies route to the test webhook receiver instead of the real Modica API
  • expectModicaMessageReceived: Verifies the webhook receiver captured a message matching destination === +<senderNumber> and content === messageText (mirrors flexToModica's sanitizeRecipientId behavior)
  • Sender number derived as 111<session-digits> to satisfy NZ staging's regex_allowed_test_numbers = "modica:111\\d{1,20}" country check
  • Helpline destination looked up from SSM via /${NODE_ENV}/modica/${accountSid}/app_name

New: integrationTests/nz/modicaCustomChannelChatbot.test.ts

Chat 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's messaging-lex-priority-v3 studio flow doesn't include that check).

New: integrationTests/as/modicaCustomChannelChatbot.test.ts

Uses the same script as the existing AS instagram test (same lex pre-survey bot, same studio flow template with integration test completion message).

Checklist

  • Corresponding issue has been opened
  • New tests added
  • Feature flags added
  • Strings are localized
  • Tested for chat contacts
  • Tested for call contacts

Other Related Issues

None

Verification steps

Run the integration tests against NZ staging and AS development environments:

  • NZ: testFilter = "nz/modicaCustomChannelChatbot"
  • AS: testFilter = "as/modicaCustomChannelChatbot"

AFTER YOU MERGE

  1. Cut a release tag using the Github workflow. Wait for it to complete and notify in the #aselo-deploys Slack channel.
  2. Comment on the ticket with the release tag version AND any additional instructions required to configure an environment to test the changes.
  3. Only then move the ticket into the QA column in JIRA

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

This section details on the original issue you should resolve

<issue_title>Modica Integration Tests</issue_title>
<issue_description>## Description

In the integrationTestRunner, add support for the modica custom channel for the NZ staging and AS development accounts

Additional context

Comments on the Issue (you are @copilot in this section)


💡 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.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modica Integration Tests

2 participants