2020-08-06 02:44:17 +08:00
|
|
|
const Page = require('./core/page');
|
|
|
|
const CustomParameters = require('./customparameters/customparameters');
|
|
|
|
const c = require('./customparameters/constants');
|
|
|
|
const util = require('./customparameters/util');
|
2020-10-09 03:25:35 +08:00
|
|
|
const { toMatchImageSnapshot } = require('jest-image-snapshot');
|
2021-02-17 04:57:10 +08:00
|
|
|
const { MAX_CUSTOM_PARAMETERS_TEST_TIMEOUT } = require('./core/constants'); // core constants (Timeouts vars imported)
|
2020-10-09 03:25:35 +08:00
|
|
|
|
|
|
|
expect.extend({ toMatchImageSnapshot });
|
2020-08-06 02:44:17 +08:00
|
|
|
|
|
|
|
const customParametersTest = () => {
|
|
|
|
beforeEach(() => {
|
2021-02-17 04:57:10 +08:00
|
|
|
jest.setTimeout(MAX_CUSTOM_PARAMETERS_TEST_TIMEOUT);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-autoJoin parameter to false
|
|
|
|
// and checks that the users don't get audio modal on login
|
|
|
|
test('Auto join', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'autoJoin';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
response = await test.autoJoin(testName, Page.getArgs(), undefined, c.autoJoin);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-listenOnlyMode parameter to false
|
|
|
|
// and checks that the users can't see or use listen Only mode
|
|
|
|
test('Listen Only Mode', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'listenOnlyMode';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2021-05-26 00:05:11 +08:00
|
|
|
response = await test.listenOnlyMode(testName, Page.getArgs(), undefined, c.listenOnlyMode);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
2021-02-17 04:57:10 +08:00
|
|
|
await test.closePage(test.page1);
|
2020-08-06 02:44:17 +08:00
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-forceListenOnly parameter to false
|
|
|
|
// and checks that the Viewers can only use listen only mode
|
|
|
|
test('Force Listen Only', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'forceListenOnly';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2021-05-26 00:05:11 +08:00
|
|
|
response = await test.forceListenOnly(testName, Page.getArgs(), undefined, c.forceListenOnly);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page2.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page2.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page2);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
2021-02-17 04:57:10 +08:00
|
|
|
// This test spec sets the userdata-bbb_skip_check_audio parameter to true
|
2020-08-06 02:44:17 +08:00
|
|
|
// and checks that the users automatically skip audio check when clicking on Microphone
|
|
|
|
test('Skip audio check', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'skipCheck';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2021-05-26 00:05:11 +08:00
|
|
|
response = await test.skipCheck(testName, Page.getArgs(), undefined, c.skipCheck);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(53.18, screenshot);
|
2021-02-17 04:57:10 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-bbb_skip_check_audio_on_first_join parameter to true
|
|
|
|
// and checks that the users automatically skip audio check when clicking on Microphone
|
|
|
|
test('Skip audio check on first join', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'skipCheckOnFirstJoin';
|
|
|
|
page.logger('before ', testName);
|
2021-05-26 00:05:11 +08:00
|
|
|
response = await test.skipCheckOnFirstJoin(testName, Page.getArgs(), undefined, c.skipCheckOnFirstJoin);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2021-02-17 04:57:10 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
|
|
|
page.logger('after ', testName);
|
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(53.18, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-clientTitle parameter to some value
|
|
|
|
// and checks that the meeting window name starts with that value
|
|
|
|
test('Client title', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'clientTitle';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
response = await test.clientTitle(testName, Page.getArgs(), undefined, c.clientTitle);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-askForFeedbackOnLogout parameter to true
|
|
|
|
// and checks that the users automatically get asked for feedback on logout page
|
|
|
|
test('Ask For Feedback On Logout', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'askForFeedbackOnLogout';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
response = await test.askForFeedbackOnLogout(testName, Page.getArgs(), undefined, c.askForFeedbackOnLogout);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-displayBrandingArea parameter to true and add a logo link
|
|
|
|
// and checks that the users see the logo displaying in the meeting
|
|
|
|
test('Display Branding Area', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'displayBrandingArea';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2021-08-03 01:46:17 +08:00
|
|
|
const parameterWithLogo = `${c.displayBrandingArea}&${util.encodeCustomParams(c.logo)}`;
|
2020-08-06 02:44:17 +08:00
|
|
|
response = await test.displayBrandingArea(testName, Page.getArgs(), undefined, parameterWithLogo);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-shortcuts parameter to one or a list of shortcuts parameters
|
|
|
|
// and checks that the users can use those shortcuts
|
|
|
|
test('Shortcuts', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'shortcuts';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2021-08-03 01:46:17 +08:00
|
|
|
response = await test.shortcuts(testName, Page.getArgs(), undefined, util.encodeCustomParams(c.shortcuts));
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-enableScreensharing parameter to false
|
|
|
|
// and checks that the Moderator can not see the Screen sharing button
|
|
|
|
test('Enable Screensharing', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'enableScreensharing';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
response = await test.enableScreensharing(testName, Page.getArgs(), undefined, c.enableScreensharing);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-enableVideo parameter to false
|
|
|
|
// and checks that the Moderator can not see the Webcam sharing button
|
|
|
|
test('Enable Webcam', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'enableVideo';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2021-05-26 00:05:11 +08:00
|
|
|
response = await test.enableVideo(testName, Page.getArgs(), undefined, c.enableVideo);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-autoShareWebcam parameter to true
|
|
|
|
// and checks that the Moderator sees the Webcam Settings Modal automatically at his connection to meeting
|
|
|
|
test('Auto Share Webcam', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'autoShareWebcam';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2021-05-26 00:05:11 +08:00
|
|
|
response = await test.autoShareWebcam(testName, Page.getArgs(), undefined, c.autoShareWebcam);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-multiUserPenOnly parameter to true
|
|
|
|
// and checks that at multi Users whiteboard other users can see only pencil as drawing tool
|
|
|
|
test('Multi Users Pen Only', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'multiUserPenOnly';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
response = await test.multiUserPenOnly(testName, Page.getArgs(), undefined, c.multiUserPenOnly);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
|
|
|
await test.page2.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.close(test.page1, test.page2);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-presenterTools parameter to an interval of parameters
|
|
|
|
// and checks that at multi Users whiteboard Presenter can see only the set tools from the interval
|
|
|
|
test('Presenter Tools', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'presenterTools';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2021-08-03 01:46:17 +08:00
|
|
|
response = await test.presenterTools(testName, Page.getArgs(), undefined, util.encodeCustomParams(c.presenterTools));
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-multiUserTools parameter to an interval of parameters
|
|
|
|
// and checks that at multi Users whiteboard other users can see only the set tools from the interval
|
|
|
|
test('Multi Users Tools', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'multiUserTools';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2021-08-03 01:46:17 +08:00
|
|
|
response = await test.multiUserTools(testName, Page.getArgs(), undefined, util.encodeCustomParams(c.multiUserTools));
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
|
|
|
await test.page2.stopRecording();
|
|
|
|
screenshot = await test.page2.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.close(test.page1, test.page2);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-customStyle parameter to an interval of styles
|
|
|
|
// and checks that the meeting displays what was called in the styles interval
|
|
|
|
test('Custom Styles', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'customStyle';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2021-08-03 01:46:17 +08:00
|
|
|
response = await test.customStyle(testName, Page.getArgs(), undefined, util.encodeCustomParams(c.customStyle));
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-customStyleUrl parameter to a styles URL
|
|
|
|
// and checks that the meeting displays what was called in the styles URL
|
|
|
|
test('Custom Styles URL', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'customStyleUrl';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2021-08-03 01:46:17 +08:00
|
|
|
response = await test.customStyleUrl(testName, Page.getArgs(), undefined, util.encodeCustomParams(c.customStyleUrl));
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-autoSwapLayout parameter to true
|
|
|
|
// and checks that at any webcam share, the focus will be on the webcam,
|
|
|
|
// and the presentation gets minimized and the available shared webcam will replace the Presentation
|
|
|
|
test('Auto Swap Layout', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'autoSwapLayout';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2021-08-03 01:46:17 +08:00
|
|
|
response = await test.autoSwapLayout(testName, Page.getArgs(), undefined, c.autoSwapLayout);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-hidePresentation parameter to true
|
|
|
|
// and checks that the Presentation is totally hidden, and its place will be displaying a message
|
|
|
|
test('Hide Presentation', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'hidePresentation';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2021-08-03 01:46:17 +08:00
|
|
|
response = await test.hidePresentation(testName, Page.getArgs(), undefined, util.encodeCustomParams(c.hidePresentation));
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-bannerText parameter to some text
|
|
|
|
// and checks that the meeting has a banner bar containing the same text
|
|
|
|
test('Banner Text', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'bannerText';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2021-08-03 01:46:17 +08:00
|
|
|
response = await test.bannerText(testName, Page.getArgs(), undefined, util.encodeCustomParams(c.bannerText));
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-bannerColor parameter to some hex color value
|
|
|
|
// and checks that the meeting has a banner bar containing that color in rgb(r, g, b)
|
|
|
|
test('Banner Color', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'bannerColor';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
const colorToRGB = util.hexToRgb(c.color);
|
2021-08-03 01:46:17 +08:00
|
|
|
response = await test.bannerColor(testName, Page.getArgs(), undefined, `${c.bannerColor}&${util.encodeCustomParams(c.bannerText)}`, colorToRGB);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-bbb_show_public_chat_on_login parameter to false
|
|
|
|
// and checks that the users don't see that box by default
|
|
|
|
test('Show Public Chat On Login', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'showPublicChatOnLogin';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
response = await test.showPublicChatOnLogin(testName, Page.getArgs(), undefined, `${c.showPublicChatOnLogin}`);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-bbb_force_restore_presentation_on_new_events parameter to true
|
|
|
|
// and checks that the viewers get the presentation restored forcefully when the Moderator zooms
|
|
|
|
// in/out the presentation or publishes a poll or adds an annotation
|
|
|
|
test('Force Restore Presentation On New Events', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
2020-10-09 03:25:35 +08:00
|
|
|
let screenshot;
|
2020-08-06 02:44:17 +08:00
|
|
|
try {
|
|
|
|
const testName = 'forceRestorePresentationOnNewEvents';
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('before ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
response = await test.forceRestorePresentationOnNewEvents(testName, Page.getArgs(), undefined, `${c.forceRestorePresentationOnNewEvents}`);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
|
|
|
await test.page2.stopRecording();
|
2020-10-09 03:25:35 +08:00
|
|
|
screenshot = await test.page1.page.screenshot();
|
2020-08-27 20:44:36 +08:00
|
|
|
page.logger('after ', testName);
|
2020-08-06 02:44:17 +08:00
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.close(test.page1, test.page2);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
2020-09-22 02:22:11 +08:00
|
|
|
|
|
|
|
// This test spec sets the userdata-bbb_record_video parameter to false
|
|
|
|
// and makes sure that the meeting recording button should not be available
|
|
|
|
test('Record Meeting', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
|
|
|
try {
|
|
|
|
const testName = 'recordMeeting';
|
|
|
|
page.logger('before ', testName);
|
|
|
|
response = await test.recordMeeting(testName, Page.getArgs(), undefined, `${c.recordMeeting}`);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-09-22 02:22:11 +08:00
|
|
|
page.logger('after ', testName);
|
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-09-22 02:22:11 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-bbb_skip_video_preview parameter to true
|
|
|
|
// and makes sure that the webcam video preview modal should not appear
|
|
|
|
test('Skip Video Preview', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
|
|
|
try {
|
|
|
|
const testName = 'skipVideoPreview';
|
|
|
|
page.logger('before ', testName);
|
2021-05-26 00:05:11 +08:00
|
|
|
response = await test.skipVideoPreview(testName, Page.getArgs(), undefined, `${c.skipVideoPreview}`);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-09-22 02:22:11 +08:00
|
|
|
page.logger('after ', testName);
|
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-09-22 02:22:11 +08:00
|
|
|
});
|
|
|
|
|
2021-02-17 04:57:10 +08:00
|
|
|
// This test spec sets the userdata-bbb_skip_video_preview_on_first_join parameter to true
|
|
|
|
// and makes sure that the webcam video preview modal should not appear on first join only
|
|
|
|
test('Skip Video Preview on First Join', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
|
|
|
try {
|
|
|
|
const testName = 'skipVideoPreviewOnFirstJoin';
|
|
|
|
page.logger('before ', testName);
|
2021-05-26 00:05:11 +08:00
|
|
|
response = await test.skipVideoPreviewOnFirstJoin(testName, Page.getArgs(), undefined, `${c.skipVideoPreviewOnFirstJoin}`);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2021-02-17 04:57:10 +08:00
|
|
|
page.logger('after ', testName);
|
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2021-02-17 04:57:10 +08:00
|
|
|
});
|
|
|
|
|
2020-09-22 02:22:11 +08:00
|
|
|
// This test spec sets the userdata-bbb_mirror_own_webcam parameter to true
|
|
|
|
// and makes sure that the webcam video preview and the container
|
|
|
|
// should both appear with mirrored Tag
|
|
|
|
test('Mirror Own Webcam', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
|
|
|
try {
|
|
|
|
const testName = 'mirrorOwnWebcam';
|
|
|
|
page.logger('before ', testName);
|
2021-05-26 00:05:11 +08:00
|
|
|
response = await test.mirrorOwnWebcam(testName, Page.getArgs(), undefined, `${c.mirrorOwnWebcam}`);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-09-22 02:22:11 +08:00
|
|
|
page.logger('after ', testName);
|
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-09-22 02:22:11 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// This test spec sets the userdata-bbb_show_participants_on_login parameter to false
|
|
|
|
// and makes sure that the user list won't appear on login
|
|
|
|
test('Show Participants on Login', async () => {
|
|
|
|
const test = new CustomParameters();
|
|
|
|
const page = new Page();
|
|
|
|
let response;
|
|
|
|
try {
|
|
|
|
const testName = 'showParticipantsOnLogin';
|
|
|
|
page.logger('before ', testName);
|
2021-05-26 00:05:11 +08:00
|
|
|
response = await test.showParticipantsOnLogin(testName, Page.getArgs(), undefined, `${c.showParticipantsOnLogin}`);
|
2021-02-26 23:52:17 +08:00
|
|
|
await test.page1.stopRecording();
|
2020-09-22 02:22:11 +08:00
|
|
|
page.logger('after ', testName);
|
|
|
|
} catch (e) {
|
|
|
|
page.logger(e);
|
|
|
|
} finally {
|
|
|
|
await test.closePage(test.page1);
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-06-06 23:30:46 +08:00
|
|
|
await Page.checkRegression(0.5, screenshot);
|
2020-09-22 02:22:11 +08:00
|
|
|
});
|
2020-08-06 02:44:17 +08:00
|
|
|
};
|
2020-09-22 02:22:11 +08:00
|
|
|
|
2020-08-06 02:44:17 +08:00
|
|
|
module.exports = exports = customParametersTest;
|