Fix failing integration and livechat tests against latest Rocket.Chat#389
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
a3753a2 to
54e955a
Compare
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
54e955a to
2326f40
Compare
|
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.



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