Skip to content

Commit 0ca4805

Browse files
author
Dipanshu Sharma
committed
test: resolved merge conflicts errors
1 parent a88478f commit 0ca4805

20 files changed

Lines changed: 1995 additions & 1415 deletions

File tree

.circleci/config.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,20 @@ jobs:
180180
command: |
181181
PACKAGES=$(node tooling/modified-packages.js --single-line)
182182
183-
node -v
183+
echo "Modified Packages:"
184+
echo "${PACKAGES}"
185+
186+
VAR1="@webex/plugin-meetings"
187+
VAR2="webex"
188+
for PACKAGE in ${PACKAGES}; do
189+
if [[ "$PACKAGE" == "$VAR1" || "$PACKAGE" == "$VAR2" ]]; then
190+
yarn run test:unit --silent --packages "${PACKAGE}"
191+
echo "DONE TESTING ${PACKAGE} ON MOCHA"
192+
fi
193+
done
194+
184195
yarn run jest --selectProjects ${PACKAGES} --maxWorkers=2
196+
echo "DONE TESTING"
185197
# This script parses all the XML files generated by mocha and karma to see if any tests failed/errored out
186198
# The reason this script exists is that all tests are "exec"'d and running in a single process instead of a parallel
187199
# So if a failure happens it will continue to the next test suite in the queue
@@ -200,9 +212,13 @@ jobs:
200212
exit 1
201213
fi
202214
- store_test_results:
203-
path: coverage/junit
215+
path: reports/junit
204216
- store_artifacts:
205-
path: coverage
217+
path: reports/junit
218+
destination: junit
219+
- store_artifacts:
220+
path: sauce.log
221+
destination: sauce
206222

207223
samples:
208224
working_directory: ~/webex-js-sdk

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"search.exclude": {
1616
"**/bower_components": true,
17-
"**/dist": true,
17+
"**/dist": true
1818
},
1919
"editor.codeActionsOnSave": {
2020
"source.fixAll": true,

jest.config.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
const packages = [
32
'@webex/common',
43
'@webex/common-evented',
@@ -36,7 +35,6 @@ const packages = [
3635
'@webex/plugin-authorization-node',
3736
'@webex/plugin-device-manager',
3837
'@webex/plugin-logger',
39-
'@webex/plugin-meetings',
4038
'@webex/plugin-memberships',
4139
'@webex/plugin-messages',
4240
'@webex/plugin-people',
@@ -66,12 +64,11 @@ const packages = [
6664
'@webex/webex-server',
6765
'@webex/webrtc',
6866
'@webex/xunit-with-logs',
69-
'webex'
7067
];
7168

72-
const packagesWithSetup = [
73-
'@webex/plugin-meetings'
74-
];
69+
/* const packagesWithSetup = [
70+
//'@webex/plugin-meetings'
71+
]; */
7572

7673
const jestProject = [];
7774

@@ -84,19 +81,16 @@ packages.forEach((packageName) => {
8481
testEnvironment: 'node',
8582
displayName: packageName,
8683

87-
testMatch: [
88-
`<rootDir>/packages/${packageName}/test/unit/**/!(lib|fixture)/*.[jt]s`
89-
]
84+
testMatch: [`<rootDir>/packages/${packageName}/test/unit/**/!(lib|fixture)/*.[jt]s`],
9085
};
9186

92-
if (packagesWithSetup.includes(packageName)) {
87+
/* if (packagesWithSetup.includes(packageName)) {
9388
config.setupFiles = [`<rootDir>/packages/${packageName}/jest.setup.js`];
94-
}
89+
} */
9590

9691
jestProject.push(config);
9792
});
9893

99-
10094
module.exports = {
10195
clearMocks: true,
10296
rootDir: './',

packages/@webex/internal-plugin-avatar/test/unit/spec/avatar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ describe('plugin-avatar', () => {
559559
},
560560
],
561561
},
562-
})
562+
}})
563563
);
564564

565565
return Promise.all([

packages/@webex/internal-plugin-conversation/test/unit/spec/conversation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ describe('plugin-conversation', () => {
138138
it('should convert a "us" cluster to WEBEX_CONVERSATION_DEFAULT_CLUSTER cluster', async () => {
139139
await webex.internal.conversation.getUrlFromClusterId({cluster: 'us'});
140140

141-
sinon.assert.calledWith(webex.internal.services.getServiceFromClusterId, {clusterId: 'urn:TEAM:us-east-1_int13:identityLookup'});
141+
sinon.assert.calledWith(webex.internal.services.getServiceFromClusterId, {clusterId: 'urn:TEAM:us-east-2_a:identityLookup'});
142142
});
143143

144144
it('should add the cluster service when missing', async () => {

packages/@webex/plugin-meetings/jest.setup.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/@webex/plugin-meetings/src/meeting/effectsState.ts

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,10 @@ class EffectsState {
134134
this.state.callToWebrtcBNRInProgress = false;
135135
LoggerProxy.logger.error('Meeting:index#enableBNR.', error);
136136

137-
Metrics.sendBehavioralMetric(
138-
BEHAVIORAL_METRICS.ENABLE_BNR_FAILURE,
139-
{
140-
reason: error.message,
141-
stack: error.stack
142-
}
143-
);
137+
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ENABLE_BNR_FAILURE, {
138+
reason: error.message,
139+
stack: error.stack,
140+
});
144141

145142
return this.rejectPromise(error);
146143
}
@@ -197,13 +194,10 @@ class EffectsState {
197194
this.state.callToWebrtcBNRInProgress = false;
198195
LoggerProxy.logger.error(`Meeting:index#disableBNR. ${error}`);
199196

200-
Metrics.sendBehavioralMetric(
201-
BEHAVIORAL_METRICS.DISABLE_BNR_FAILURE,
202-
{
203-
reason: error.message,
204-
stack: error.stack
205-
}
206-
);
197+
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.DISABLE_BNR_FAILURE, {
198+
reason: error.message,
199+
stack: error.stack,
200+
});
207201

208202
return this.rejectPromise(error);
209203
}

packages/@webex/plugin-meetings/src/meeting/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ import {SkinTones, Reactions} from '../reactions/reactions';
9090
import {Reaction, ReactionType, SkinToneType} from '../reactions/reactions.type';
9191

9292
import InMeetingActions from './in-meeting-actions';
93+
import RecordingController from '../recording-controller';
94+
import ControlsOptionsManager from '../controls-options-manager';
9395

9496
const {isBrowser} = BrowserDetection();
9597

@@ -5695,7 +5697,9 @@ export default class Meeting extends StatelessWebexPlugin {
56955697

56965698
if (layoutType) {
56975699
if (!LAYOUT_TYPES.includes(layoutType)) {
5698-
return this.rejectWithErrorLog('Meeting:index#changeVideoLayout --> cannot change video layout, invalid layoutType recieved.');
5700+
return this.rejectWithErrorLog(
5701+
'Meeting:index#changeVideoLayout --> cannot change video layout, invalid layoutType recieved.'
5702+
);
56995703
}
57005704

57015705
layoutInfo.layoutType = layoutType;

packages/@webex/plugin-meetings/test/unit/spec/locus-info/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe('plugin-meetings', () => {
6464
describe('#updateControls', () => {
6565
let newControls;
6666

67-
beforeEach(() => {
67+
beforeEach('setup new controls', () => {
6868
newControls = {
6969
lock: {},
7070
meetingFull: {},
@@ -403,7 +403,7 @@ describe('plugin-meetings', () => {
403403
describe('#updateParticipants()', () => {
404404
let newParticipants;
405405

406-
beforeEach(() => {
406+
beforeEach('setup new participants', () => {
407407
newParticipants = [
408408
{
409409
person: {
@@ -897,7 +897,7 @@ describe('plugin-meetings', () => {
897897
let getRolesSpy;
898898
let isJoinedSpy;
899899

900-
beforeEach(() => {
900+
beforeEach('setup meeting info', () => {
901901
meetingInfo = {
902902
displayHints: {
903903
joined: ['ROSTER_IN_MEETING', 'LOCK_STATUS_UNLOCKED'],

packages/@webex/plugin-meetings/test/unit/spec/meeting/effectsState.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {assert} from '@webex/test-helper-chai';
33
import sinon from 'sinon';
44
import MockWebex from '@webex/test-helper-mock-webex';
55
import {BNR_STATUS} from '@webex/plugin-meetings/src/constants';
6+
67
import BEHAVIORAL_METRICS from '@webex/plugin-meetings/src/metrics/constants';
78
import Meeting from '@webex/plugin-meetings/src/meeting';
89
import Meetings from '@webex/plugin-meetings';
@@ -211,12 +212,14 @@ describe('plugin-meetings', () => {
211212
});
212213

213214
it('if called twice, does bnr effect enable on audio track for the first request and resolves second', async () => {
214-
Promise.all([effects.handleClientRequest(true, meeting), effects.handleClientRequest(true, meeting)])
215-
.then((resolveFirst, resolveSecond) => {
216-
assert.isTrue(resolveFirst);
217-
assert.isTrue(resolveSecond);
218-
assert.calledOnce(MediaUtil.createMediaStream);
219-
});
215+
Promise.all([
216+
effects.handleClientRequest(true, meeting),
217+
effects.handleClientRequest(true, meeting),
218+
]).then((resolveFirst, resolveSecond) => {
219+
assert.isTrue(resolveFirst);
220+
assert.isTrue(resolveSecond);
221+
assert.calledOnce(MediaUtil.createMediaStream);
222+
});
220223
});
221224

222225
it('should throw error for inappropriate sample rate and send error metrics', async () => {

0 commit comments

Comments
 (0)