@webex/plugin-meetings 3.8.1-next.43 → 3.8.1-next.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +1 -15
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +57 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +5 -5
- package/src/meeting/index.ts +0 -9
- package/src/meeting/util.ts +60 -2
- package/test/unit/spec/meeting/index.js +16 -12
- package/test/unit/spec/meeting/utils.js +101 -1
@@ -3,12 +3,14 @@ import sinon from 'sinon';
|
|
3
3
|
import {assert} from '@webex/test-helper-chai';
|
4
4
|
import Meetings from '@webex/plugin-meetings';
|
5
5
|
import MeetingUtil from '@webex/plugin-meetings/src/meeting/util';
|
6
|
-
import {LOCAL_SHARE_ERRORS} from '@webex/plugin-meetings/src/constants';
|
6
|
+
import {LOCAL_SHARE_ERRORS, PASSWORD_STATUS} from '@webex/plugin-meetings/src/constants';
|
7
7
|
import LoggerProxy from '@webex/plugin-meetings/src/common/logs/logger-proxy';
|
8
8
|
import LoggerConfig from '@webex/plugin-meetings/src/common/logs/logger-config';
|
9
9
|
import {SELF_POLICY, IP_VERSION} from '@webex/plugin-meetings/src/constants';
|
10
10
|
import MockWebex from '@webex/test-helper-mock-webex';
|
11
11
|
import * as BrowserDetectionModule from '@webex/plugin-meetings/src/common/browser-detection';
|
12
|
+
import PasswordError from '@webex/plugin-meetings/src/common/errors/password-error';
|
13
|
+
import CaptchaError from '@webex/plugin-meetings/src/common/errors/captcha-error';
|
12
14
|
|
13
15
|
describe('plugin-meetings', () => {
|
14
16
|
let webex;
|
@@ -638,6 +640,28 @@ describe('plugin-meetings', () => {
|
|
638
640
|
|
639
641
|
assert.equal(parameter.locusClusterUrl, 'locusClusterUrl');
|
640
642
|
});
|
643
|
+
|
644
|
+
it('should post client event with error when join fails', async () => {
|
645
|
+
const joinError = new Error('Join failed');
|
646
|
+
meeting.meetingRequest.joinMeeting.rejects(joinError);
|
647
|
+
meeting.meetingInfo = { meetingLookupUrl: 'test-lookup-url' };
|
648
|
+
|
649
|
+
try {
|
650
|
+
await MeetingUtil.joinMeeting(meeting, {});
|
651
|
+
assert.fail('Expected joinMeeting to throw an error');
|
652
|
+
} catch (error) {
|
653
|
+
assert.equal(error, joinError);
|
654
|
+
|
655
|
+
// Verify error client event was submitted
|
656
|
+
assert.calledWith(webex.internal.newMetrics.submitClientEvent, {
|
657
|
+
name: 'client.locus.join.response',
|
658
|
+
payload: {
|
659
|
+
identifiers: { meetingLookupUrl: 'test-lookup-url' },
|
660
|
+
},
|
661
|
+
options: { meetingId: meeting.id, rawError: joinError },
|
662
|
+
});
|
663
|
+
}
|
664
|
+
});
|
641
665
|
});
|
642
666
|
|
643
667
|
describe('joinMeetingOptions', () => {
|
@@ -677,6 +701,82 @@ describe('plugin-meetings', () => {
|
|
677
701
|
joinMeetingSpy.restore();
|
678
702
|
}
|
679
703
|
});
|
704
|
+
|
705
|
+
it('should submit client event and reject with PasswordError when password is required', async () => {
|
706
|
+
const meeting = {
|
707
|
+
id: 'meeting-id',
|
708
|
+
passwordStatus: PASSWORD_STATUS.REQUIRED,
|
709
|
+
resourceId: null,
|
710
|
+
requiredCaptcha: null,
|
711
|
+
getWebexObject: sinon.stub().returns(webex),
|
712
|
+
};
|
713
|
+
|
714
|
+
try {
|
715
|
+
await MeetingUtil.joinMeetingOptions(meeting, {});
|
716
|
+
assert.fail('Expected joinMeetingOptions to throw PasswordError');
|
717
|
+
} catch (error) {
|
718
|
+
assert.instanceOf(error, PasswordError);
|
719
|
+
|
720
|
+
// Verify client event was submitted with error details
|
721
|
+
assert.calledWith(webex.internal.newMetrics.submitClientEvent, {
|
722
|
+
name: 'client.meetinginfo.response',
|
723
|
+
options: {
|
724
|
+
meetingId: meeting.id,
|
725
|
+
},
|
726
|
+
payload: {
|
727
|
+
errors: [
|
728
|
+
{
|
729
|
+
fatal: false,
|
730
|
+
category: 'expected',
|
731
|
+
name: 'other',
|
732
|
+
shownToUser: false,
|
733
|
+
errorCode: error.code,
|
734
|
+
errorDescription: error.name,
|
735
|
+
rawErrorMessage: error.sdkMessage,
|
736
|
+
},
|
737
|
+
],
|
738
|
+
},
|
739
|
+
});
|
740
|
+
}
|
741
|
+
});
|
742
|
+
|
743
|
+
it('should submit client event and reject with CaptchaError when captcha is required', async () => {
|
744
|
+
const meeting = {
|
745
|
+
id: 'meeting-id',
|
746
|
+
passwordStatus: null,
|
747
|
+
resourceId: null,
|
748
|
+
requiredCaptcha: {captchaId: 'test-captcha'},
|
749
|
+
getWebexObject: sinon.stub().returns(webex),
|
750
|
+
};
|
751
|
+
|
752
|
+
try {
|
753
|
+
await MeetingUtil.joinMeetingOptions(meeting, {});
|
754
|
+
assert.fail('Expected joinMeetingOptions to throw CaptchaError');
|
755
|
+
} catch (error) {
|
756
|
+
assert.instanceOf(error, CaptchaError);
|
757
|
+
|
758
|
+
// Verify client event was submitted with error details
|
759
|
+
assert.calledWith(webex.internal.newMetrics.submitClientEvent, {
|
760
|
+
name: 'client.meetinginfo.response',
|
761
|
+
options: {
|
762
|
+
meetingId: meeting.id,
|
763
|
+
},
|
764
|
+
payload: {
|
765
|
+
errors: [
|
766
|
+
{
|
767
|
+
fatal: false,
|
768
|
+
category: 'expected',
|
769
|
+
name: 'other',
|
770
|
+
shownToUser: false,
|
771
|
+
errorCode: error.code,
|
772
|
+
errorDescription: error.name,
|
773
|
+
rawErrorMessage: error.sdkMessage,
|
774
|
+
},
|
775
|
+
],
|
776
|
+
},
|
777
|
+
});
|
778
|
+
}
|
779
|
+
});
|
680
780
|
});
|
681
781
|
|
682
782
|
describe('getUserDisplayHintsFromLocusInfo', () => {
|