Skip to content

Commit 7d7f552

Browse files
author
Tim Mendoza
committed
Update e2e test to look for participant in conversation
1 parent d7357e5 commit 7d7f552

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/e2e/e2e.test.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ describe('the RTC Twilio-CLI Plugin', () => {
142142
expect(room.type).toEqual('group');
143143
});
144144

145-
it('should return a video token with a valid Chat Grant', async () => {
145+
it('should return a video token with a valid Chat Grant and add the participant to the conversation', async () => {
146146
const ROOM_NAME = nanoid();
147147
const { body } = await superagent
148148
.post(`${URL}/token`)
@@ -155,7 +155,16 @@ describe('the RTC Twilio-CLI Plugin', () => {
155155
service => (service.sid = conversationServiceSid)
156156
);
157157

158+
const conversationParticipants = await twilioClient.conversations
159+
.conversations(conversationServiceSid)
160+
.participants.list();
161+
162+
const conversationParticipant = conversationParticipants.find(
163+
participant => participant.identity === 'test user'
164+
);
165+
158166
expect(deployedConversationsService).toBeDefined();
167+
expect(conversationParticipant).toBeDefined();
159168
});
160169

161170
it('should return a video token without creating a room when the "create_room" flag is false', async () => {

0 commit comments

Comments
 (0)