Skip to content

Commit 52c3a30

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

22 files changed

Lines changed: 2003 additions & 1418 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-authorization-browser-first-party/test/unit/spec/authorization.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,14 @@ describe('plugin-authorization-browser-first-party', () => {
180180
});
181181
describe('when the url contains an error', () => {
182182
it('throws a grant error', () => {
183+
let err = null;
183184
try {
184185
makeWebex('http://127.0.0.1:8000/?error=invalid_scope&error_description=The%20requested%20scope%20is%20invalid.');
185-
}
186+
}
186187
catch (e) {
187-
expect(e.message).toBe('Cannot convert object to primitive value');
188+
err = e;
188189
}
190+
expect(err?.message).toBe('Cannot convert object to primitive value')
189191
});
190192
});
191193

packages/@webex/plugin-authorization-browser/test/unit/spec/authorization.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {Credentials} from '@webex/webex-core';
1313
import Authorization from '@webex/plugin-authorization-browser';
1414
import {base64, patterns} from '@webex/common';
1515
import {merge} from 'lodash';
16+
import {expect} from '@jest/globals';
1617

1718
describe('plugin-authorization-browser', () => {
1819
describe('Authorization', () => {
@@ -187,12 +188,14 @@ describe('plugin-authorization-browser', () => {
187188
});
188189

189190
it('throws a grant error when the url contains one', () => {
191+
let err = null;
190192
try {
191193
makeWebexCore('http://127.0.0.1:8000/?error=invalid_scope&error_description=The%20requested%20scope%20is%20invalid.');
192194
}
193195
catch (e) {
194-
expect(e.message).toBe('Cannot convert object to primitive value');
196+
err = e;
195197
}
198+
expect(err?.message).toBe('Cannot convert object to primitive value')
196199
});
197200
});
198201

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;

0 commit comments

Comments
 (0)