Skip to content

Commit 60e7f1e

Browse files
committed
fix: enable TEST_MODE_API for UI tests too
UI tests also exercise deprecated DDP methods indirectly through the client (CachedStore template-literal calls, useMethod calls in code that hasn't migrated to useEndpoint yet). The deprecation throw suppression has to cover them too, not just api/api-livechat runs.
1 parent 0f3d94a commit 60e7f1e

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

.github/workflows/ci-test-e2e.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,13 @@ jobs:
176176
- name: Start containers for CE
177177
if: inputs.release == 'ce'
178178
env:
179-
# API tests intentionally invoke deprecated DDP methods through
180-
# /v1/method.call/:method. The deprecation logger throws under
181-
# TEST_MODE, so for api/api-livechat runs we set TEST_MODE_API
182-
# to suppress the throw (it still logs). Forwarded via
183-
# docker-compose-ci.yml -> rocketchat container env.
184-
TEST_MODE_API: ${{ (inputs.type == 'api' || inputs.type == 'api-livechat') && 'true' || '' }}
179+
# End-to-end tests (api, api-livechat, ui) intentionally exercise
180+
# deprecated DDP methods — directly through /v1/method.call/:method
181+
# in API tests, indirectly via the client UI in UI tests. The
182+
# deprecation logger throws under TEST_MODE, so for any e2e run we
183+
# set TEST_MODE_API to suppress the throw (it still logs).
184+
# Forwarded via docker-compose-ci.yml -> rocketchat container env.
185+
TEST_MODE_API: 'true'
185186
run: |
186187
# when we are testing CE, we only need to start the rocketchat container
187188
DEBUG_LOG_LEVEL=${DEBUG_LOG_LEVEL:-0} docker compose -f docker-compose-ci.yml up -d rocketchat --wait
@@ -192,7 +193,7 @@ jobs:
192193
ENTERPRISE_LICENSE: ${{ inputs.enterprise-license }}
193194
TRANSPORTER: ${{ inputs.transporter }}
194195
COMPOSE_PROFILES: ${{ inputs.type == 'api' && 'api' || '' }}
195-
TEST_MODE_API: ${{ (inputs.type == 'api' || inputs.type == 'api-livechat') && 'true' || '' }}
196+
TEST_MODE_API: 'true'
196197
run: |
197198
DEBUG_LOG_LEVEL=${DEBUG_LOG_LEVEL:-0} docker compose -f docker-compose-ci.yml up -d --wait
198199

0 commit comments

Comments
 (0)