Skip to content

Fix failing integration and livechat tests against latest Rocket.Chat#389

Merged
jadolg merged 1 commit into
masterfrom
claude/rocketchat-api-failing-tests-9edv5j
Jul 6, 2026
Merged

Fix failing integration and livechat tests against latest Rocket.Chat#389
jadolg merged 1 commit into
masterfrom
claude/rocketchat-api-failing-tests-9edv5j

Conversation

@jadolg

@jadolg jadolg commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Incoming integrations that post as a user now require that user to hold the
'message-impersonate' permission, which is not granted to the admin role by
default. Grant it to the admin role in a session fixture so the integration
tests (and the channel/group integration tests) can create incoming webhooks.

Livechat rooms can no longer be opened by merely setting the agent's user
status to 'online' via REST, because in a headless test environment there is
no persistent connection keeping the presence online, so Rocket.Chat rejects
the room with 'no-agent-online'. Enable 'Livechat_accept_chats_with_no_agents'
around the affected flows so rooms are created and inquiries queued regardless,
restoring the original setting afterwards.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_019F2P1VEdySy6QeE3JUs9PK

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.50%. Comparing base (2b85b55) to head (2326f40).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #389      +/-   ##
==========================================
+ Coverage   99.36%   99.50%   +0.14%     
==========================================
  Files          53       53              
  Lines        2831     2836       +5     
  Branches      160      159       -1     
==========================================
+ Hits         2813     2822       +9     
+ Misses         14       11       -3     
+ Partials        4        3       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jadolg jadolg force-pushed the claude/rocketchat-api-failing-tests-9edv5j branch 2 times, most recently from a3753a2 to 54e955a Compare July 6, 2026 16:56
Incoming integrations that post as a user require that user to hold the
'message-impersonate' permission, which is granted to the 'bot' and 'app' roles
by default but not to 'admin'. Grant it to the admin role in a session fixture
so the integration tests (and the channel/group integration tests) can create
incoming webhooks.

Livechat rooms can no longer be opened by merely setting the agent's user
status to 'online' via REST, because in a headless test environment there is
no persistent connection keeping the presence online, so Rocket.Chat rejects
the room with 'no-agent-online'. Add a shared accept_chats_with_no_agents
fixture that enables 'Livechat_accept_chats_with_no_agents' so rooms are
created and inquiries queued regardless, restoring the original setting
afterwards.

Claude-Session: https://claude.ai/code/session_019F2P1VEdySy6QeE3JUs9PK
@jadolg jadolg force-pushed the claude/rocketchat-api-failing-tests-9edv5j branch from 54e955a to 2326f40 Compare July 6, 2026 17:18
@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

@jadolg jadolg merged commit 680d30b into master Jul 6, 2026
42 checks passed
@jadolg jadolg deleted the claude/rocketchat-api-failing-tests-9edv5j branch July 6, 2026 17:45
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.

2 participants