Skip to content

Commit

Permalink
feat(plugin-meetings): added _setLogUploadIntervalMultiplicationFactor (
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-bazyl authored Feb 26, 2025
1 parent 9abc67c commit 83d1f72
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/@webex/plugin-meetings/src/meetings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,20 @@ export default class Meetings extends WebexPlugin {
});
}

/**
* API to change log upload interval. Setting the factor to 0 will disable periodic log uploads.
*
* @param {number} factor new factor value
* @returns {void}
*/
private _setLogUploadIntervalMultiplicationFactor(factor: number) {
if (typeof factor !== 'number') {
return;
}
// @ts-ignore
this.config.logUploadIntervalMultiplicationFactor = factor;
}

/**
* API to toggle unified meetings
* @param {Boolean} changeState
Expand Down
27 changes: 27 additions & 0 deletions packages/@webex/plugin-meetings/test/unit/spec/meetings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,33 @@ describe('plugin-meetings', () => {
});
});

describe('#_setLogUploadIntervalMultiplicationFactor', () => {
it('should have _setLogUploadIntervalMultiplicationFactor', () => {
assert.equal(typeof webex.meetings._setLogUploadIntervalMultiplicationFactor, 'function');
});

describe('success', () => {
it('should update the config', () => {
const someValue = 1.23;

webex.meetings._setLogUploadIntervalMultiplicationFactor(someValue);
assert.equal(webex.meetings.config.logUploadIntervalMultiplicationFactor, someValue);
});
});

describe('failure', () => {
it('should not accept non-number input', () => {
const logUploadIntervalMultiplicationFactor = webex.meetings.config.logUploadIntervalMultiplicationFactor;

webex.meetings._setLogUploadIntervalMultiplicationFactor('test');
assert.equal(
webex.meetings.config.logUploadIntervalMultiplicationFactor,
logUploadIntervalMultiplicationFactor
);
});
});
});

describe('#_toggleUnifiedMeetings', () => {
it('should have toggleUnifiedMeetings', () => {
assert.equal(typeof webex.meetings._toggleUnifiedMeetings, 'function');
Expand Down

0 comments on commit 83d1f72

Please sign in to comment.