Skip to content

Commit e2b2a5d

Browse files
author
Aidan Zimmermann
committed
STREAM-777: try cleanup
1 parent 6c95dc3 commit e2b2a5d

3 files changed

Lines changed: 4 additions & 79 deletions

File tree

.gitignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,12 @@ test/test-pages/*/index.html
1414

1515
*.tgz
1616
.ignore
17-
.DS_Store
1817

1918
## vscode specific files
2019
/.vscode
2120

22-
## webstorm specific files
23-
/.idea
24-
2521
## jetbrains specific files
22+
/.idea
2623
genesys-cloud-webrtc-sdk.iml
2724

2825
# tap specific files
@@ -32,3 +29,5 @@ genesys-cloud-webrtc-sdk.iml
3229
/.npmrc
3330

3431
/test-results
32+
33+
.DS_Store

changelog.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
44
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

66
# [Unreleased](https://github.com/MyPureCloud/genesys-cloud-webrtc-sdk/compare/v11.3.3...HEAD)
7-
87
### Fixed
98
* [STREAM-978](https://inindca.atlassian.net/browse/STREAM-978) - When the RTCPeerConnection is in a 'failed' state, clean up the session. Filter out voicemail participants from conversation update events. Fix potential TypeError when fetching conversations.
109
* [STREAM-987](https://inindca.atlassian.net/browse/STREAM-987) - Demo app: Memoize conversations so they don't change every render when nothing has changed

test/unit/client.test.ts

Lines changed: 1 addition & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -329,80 +329,6 @@ describe('Client', () => {
329329
expect(sessionManagerMock.startSession).not.toHaveBeenCalled();
330330
}
331331
});
332-
333-
it('should allow video conference with JWT authentication', async () => {
334-
const testJwt = 'test.jwt.token';
335-
sdk = constructSdk({ jwt: testJwt });
336-
337-
sdk._personDetails = {
338-
id: 'test-user-id',
339-
name: 'Test User',
340-
chat: {
341-
jabberId: 'test-user@test.com'
342-
}
343-
};
344-
345-
sessionManagerMock.startSession.mockResolvedValue({});
346-
await sdk.startVideoConference('test-room@conference.com');
347-
348-
expect(sessionManagerMock.startSession).toBeCalledWith({
349-
jid: 'test-room@conference.com',
350-
sessionType: SessionTypes.collaborateVideo
351-
});
352-
});
353-
354-
it('should include JWT in video session request', async () => {
355-
const testJwt = 'test.jwt.token';
356-
const mockDecodedJwt = {
357-
data: {
358-
jid: 'test-user@test.com',
359-
conversationId: 'test-conversation-id',
360-
sourceCommunicationId: 'test-source-comm-id'
361-
}
362-
};
363-
364-
jwtDecodeSpy.mockReturnValue(mockDecodedJwt);
365-
366-
sdk = constructSdk({ jwt: testJwt });
367-
const handler = new VideoSessionHandler(sdk, sessionManagerMock);
368-
369-
sdk._personDetails = {
370-
id: 'test-user-id',
371-
name: 'Test User',
372-
chat: {
373-
jabberId: 'test-user@test.com'
374-
}
375-
};
376-
377-
const mockInitiateRtcSession = jest.fn().mockResolvedValue(undefined);
378-
sdk._streamingConnection = {
379-
webrtcSessions: {
380-
initiateRtcSession: mockInitiateRtcSession
381-
},
382-
disconnect: jest.fn().mockResolvedValue(undefined)
383-
} as any;
384-
385-
const requestApiSpy = jest.spyOn(utils, 'requestApi');
386-
387-
const result = await handler.startSession({
388-
jid: 'test-room@conference.com',
389-
sessionType: SessionTypes.collaborateVideo
390-
});
391-
392-
expect(mockInitiateRtcSession).toHaveBeenCalledWith({
393-
jid: mockDecodedJwt.data.jid,
394-
conversationId: mockDecodedJwt.data.conversationId,
395-
sourceCommunicationId: mockDecodedJwt.data.sourceCommunicationId,
396-
mediaPurpose: SessionTypes.collaborateVideo,
397-
sessionType: SessionTypes.collaborateVideo
398-
});
399-
400-
expect(result).toEqual({
401-
conversationId: mockDecodedJwt.data.conversationId
402-
});
403-
404-
expect(requestApiSpy).not.toHaveBeenCalled();
405-
});
406332
});
407333

408334
describe('startLiveMonitoringSession()', () => {
@@ -424,6 +350,7 @@ describe('Client', () => {
424350
});
425351
});
426352

353+
427354
describe('startScreenShare()', () => {
428355
it('should reject if authenticated user', async () => {
429356
sdk = constructSdk();

0 commit comments

Comments
 (0)