File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -150,20 +150,30 @@ describe('the RTC Twilio-CLI Plugin', () => {
150150
151151 const conversationServiceSid = jwt . decode ( body . token ) . grants . chat . service_sid ;
152152
153+ const room = await twilioClient . video . rooms ( ROOM_NAME ) . fetch ( ) ;
154+
155+ // Find the deployed conversations service
153156 const deployedConversationsServices = await twilioClient . conversations . services . list ( ) ;
154157 const deployedConversationsService = deployedConversationsServices . find (
155158 service => ( service . sid = conversationServiceSid )
156159 ) ;
157160
161+ // Find the conversation
162+ const conversation = await twilioClient . conversations
163+ . services ( deployedConversationsService . sid )
164+ . conversations ( room . sid )
165+ . fetch ( ) ;
166+
167+ // Find the participant that has been added to the conversation
158168 const conversationParticipants = await twilioClient . conversations
159- . conversations ( conversationServiceSid )
169+ . conversations ( conversation . sid )
160170 . participants . list ( ) ;
161-
162171 const conversationParticipant = conversationParticipants . find (
163172 participant => participant . identity === 'test user'
164173 ) ;
165174
166175 expect ( deployedConversationsService ) . toBeDefined ( ) ;
176+ expect ( conversation ) . toBeDefined ( ) ;
167177 expect ( conversationParticipant ) . toBeDefined ( ) ;
168178 } ) ;
169179
You can’t perform that action at this time.
0 commit comments