Skip to content

Commit

Permalink
fix(plugin-meetings): addressed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Parimala032 committed Oct 14, 2024
1 parent 6df07aa commit e0736b0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 3 additions & 1 deletion docs/samples/browser-plugin-meetings/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ const createMeetingSelectElm = document.querySelector('#createMeetingDest');
const createMeetingActionElm = document.querySelector('#create-meeting-action');
const meetingsJoinDeviceElm = document.querySelector('#meetings-join-device');
const meetingsJoinPinElm = document.querySelector('#meetings-join-pin');
const meetingsGuestName = document.querySelector('#meetings-guest-name');
const meetingsJoinModeratorElm = document.querySelector('#meetings-join-moderator');
const meetingsListCollectElm = document.querySelector('#meetings-list-collect');
const meetingsListMsgElm = document.querySelector('#meetings-list-msg');
Expand Down Expand Up @@ -464,12 +465,13 @@ function joinMeeting({withMedia, withDevice} = {withMedia: false, withDevice: fa

const joinOptions = {
pin: meetingsJoinPinElm.value,
alias: meetingsGuestName.value,
moderator: meetingsJoinModeratorElm.checked,
moveToResource: false,
resourceId,
receiveTranscription: receiveTranscriptionOption
};

const joinMeetingNow = () => {
meeting.join(joinOptions)
.then(() => { // eslint-disable-line
Expand Down
1 change: 1 addition & 0 deletions docs/samples/browser-plugin-meetings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ <h2 class="collapsible">Meeting Management</h2>
<legend>Join Meeting</legend>
<!-- Password, captcha image and input html code -->
<div class="u-mv">
<input id="meetings-guest-name" name="GuestUserName" placeholder="Enter an alias(Optional)" value="" type="text">
<input id="meetings-join-pin" name="meetingPin" placeholder="Password/PIN" value="" type="text">
<div>
<img id="meetings-join-captcha" src="" alt="captcha" style="width: 150px; height: 70px;" hidden>
Expand Down
12 changes: 6 additions & 6 deletions packages/@webex/plugin-meetings/test/unit/spec/meeting/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ describe('plugin-meetings', () => {
};

MeetingUtil.parseLocusJoin = sinon.stub();
await MeetingUtil.joinMeeting(meeting, {alias: 'userName'});
await MeetingUtil.joinMeeting(meeting, {alias: 'assigned name'});

assert.calledOnce(meeting.meetingRequest.joinMeeting);
const parameter = meeting.meetingRequest.joinMeeting.getCall(0).args[0];

assert.equal(parameter.inviteeAddress, 'meetingJoinUrl');
assert.equal(parameter.alias, 'userName');
assert.equal(parameter.alias, 'assigned name');
});

it('#Should fallback sipUrl if meetingJoinUrl does not exists', async () => {
Expand All @@ -157,13 +157,13 @@ describe('plugin-meetings', () => {
};

MeetingUtil.parseLocusJoin = sinon.stub();
await MeetingUtil.joinMeeting(meeting, {alias: 'userName'});
await MeetingUtil.joinMeeting(meeting, {alias: 'assigned name'});

assert.calledOnce(meeting.meetingRequest.joinMeeting);
const parameter = meeting.meetingRequest.joinMeeting.getCall(0).args[0];

assert.equal(parameter.inviteeAddress, 'sipUri');
assert.equal(parameter.alias, 'userName');
assert.equal(parameter.alias, 'assigned name');
});

it('#Should fallback to meetingNumber if meetingJoinUrl/sipUrl does not exists', async () => {
Expand All @@ -176,14 +176,14 @@ describe('plugin-meetings', () => {
};

MeetingUtil.parseLocusJoin = sinon.stub();
await MeetingUtil.joinMeeting(meeting, {alias: 'userName'});
await MeetingUtil.joinMeeting(meeting, {alias: 'assigned name'});

assert.calledOnce(meeting.meetingRequest.joinMeeting);
const parameter = meeting.meetingRequest.joinMeeting.getCall(0).args[0];

assert.isUndefined(parameter.inviteeAddress);
assert.equal(parameter.meetingNumber, 'meetingNumber');
assert.equal(parameter.alias, 'userName');
assert.equal(parameter.alias, 'assigned name');
});
});

Expand Down

0 comments on commit e0736b0

Please sign in to comment.