Commit 2326f40
committed
Fix failing integration and livechat tests against latest Rocket.Chat
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_019F2P1VEdySy6QeE3JUs9PK1 parent 2b85b55 commit 2326f40
2 files changed
Lines changed: 44 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
102 | 134 | | |
103 | 135 | | |
104 | 136 | | |
105 | | - | |
| 137 | + | |
106 | 138 | | |
107 | 139 | | |
108 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
0 commit comments