exports tests as objects and defines jest syntax from new test files
This commit is contained in:
parent
46f0a1eedb
commit
36e79846a6
@ -1,14 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
echo "Now executing audio.test.js autotest:";env $(cat ./tests/puppeteer/.env | xargs) jest audio.test.js --detectOpenHandles
|
||||
echo "Now executing breakout.test.js autotest:";env $(cat ./tests/puppeteer/.env | xargs) jest breakout.test.js --detectOpenHandles
|
||||
echo "Now executing chat.test.js autotest:";env $(cat ./tests/puppeteer/.env | xargs) jest chat.test.js --detectOpenHandles
|
||||
echo "Now executing customparameters.test.js autotest:";env $(cat ./tests/puppeteer/.env | xargs) jest customparameters.test.js --detectOpenHandles
|
||||
echo "Now executing notifications.test.js autotest:";env $(cat ./tests/puppeteer/.env | xargs) jest notifications.test.js --detectOpenHandles
|
||||
echo "Now executing presentation.test.js autotest:";env $(cat ./tests/puppeteer/.env | xargs) jest presentation.test.js --detectOpenHandles
|
||||
echo "Now executing screenshare.test.js autotest:";env $(cat ./tests/puppeteer/.env | xargs) jest screenshare.test.js --detectOpenHandles
|
||||
echo "Now executing sharednotes.test.js autotest:";env $(cat ./tests/puppeteer/.env | xargs) jest sharednotes.test.js --detectOpenHandles
|
||||
echo "Now executing user.test.js autotest:";env $(cat ./tests/puppeteer/.env | xargs) jest user.test.js --detectOpenHandles
|
||||
echo "Now executing virtualizedlist.test.js autotest:";env $(cat ./tests/puppeteer/.env | xargs) jest virtualizedlist.test.js --detectOpenHandles
|
||||
echo "Now executing webcam.test.js autotest:";env $(cat ./tests/puppeteer/.env | xargs) jest webcam.test.js --detectOpenHandles
|
||||
echo "Now executing whiteboard.test.js autotest:";env $(cat ./tests/puppeteer/.env | xargs) jest whiteboard.test.js --detectOpenHandles
|
@ -1,973 +1,25 @@
|
||||
const Audio = require('./audio/audio');
|
||||
const Share = require('./webcam/share');
|
||||
const Check = require('./webcam/check');
|
||||
const Page = require('./core/page');
|
||||
const Join = require('./breakout/join');
|
||||
const Create = require('./breakout/create');
|
||||
const Send = require('./chat/send');
|
||||
const Clear = require('./chat/clear');
|
||||
const Copy = require('./chat/copy');
|
||||
const Save = require('./chat/save');
|
||||
const MultiUsers = require('./user/multiusers');
|
||||
const CustomParameters = require('./customparameters/customparameters');
|
||||
const c = require('./customparameters/constants');
|
||||
const util = require('./customparameters/util');
|
||||
const Notifications = require('./notifications/notifications');
|
||||
const ShareScreen = require('./screenshare/screenshare');
|
||||
const Slide = require('./presentation/slide');
|
||||
const Upload = require('./presentation/upload');
|
||||
const Draw = require('./whiteboard/draw');
|
||||
const VirtualizedList = require('./virtualizedlist/virtualize');
|
||||
const Status = require('./user/status');
|
||||
const audioTest = require('./audio.obj');
|
||||
const chatTest = require('./chat.obj');
|
||||
const breakoutTest = require('./breakout.obj');
|
||||
const customParametersTest = require('./customparameters.obj');
|
||||
const notificationsTest = require('./notifications.obj');
|
||||
const presentationTest = require('./presentation.obj');
|
||||
const screenShareTest = require('./screenshare.obj');
|
||||
const sharedNotesTest = require('./sharednotes.obj');
|
||||
const userTest = require('./user.obj');
|
||||
const virtualizedListTest = require('./virtualizedlist.obj');
|
||||
const webcamTest = require('./webcam.obj');
|
||||
const whiteboardTest = require('./whiteboard.obj');
|
||||
|
||||
process.setMaxListeners(Infinity);
|
||||
|
||||
describe('Audio', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Join audio with Listen Only', async () => {
|
||||
const test = new Audio();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithAudio());
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Join audio with Microphone', async () => {
|
||||
const test = new Audio();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithAudio());
|
||||
response = await test.microphone();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Breakoutrooms', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(150000);
|
||||
});
|
||||
|
||||
// Create Breakout Room
|
||||
test('Create Breakout room', async () => {
|
||||
const test = new Create();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'createBreakoutrooms';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
response = await test.testCreatedBreakout(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// Join Breakout Room
|
||||
test('Join Breakout room', async () => {
|
||||
const test = new Join();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'joinBreakoutroomsWithoutFeatures';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
await test.join(testName);
|
||||
response = await test.testJoined(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// Join Breakout Room with Video
|
||||
test('Join Breakout room with Video', async () => {
|
||||
const test = new Join();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'joinBreakoutroomsWithVideo';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
await test.join(testName);
|
||||
response = await test.testJoined(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// Join Breakout Room and start Screen Share
|
||||
test('Join Breakout room and share screen', async () => {
|
||||
const test = new Join();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'joinBreakoutroomsAndShareScreen';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
await test.join(testName);
|
||||
response = await test.testJoined(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// Join Breakout Room with Audio
|
||||
test('Join Breakout room with Audio', async () => {
|
||||
const test = new Join();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'joinBreakoutroomsWithAudio';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
await test.join(testName);
|
||||
response = await test.testJoined(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Chat', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Send message', async () => {
|
||||
const test = new Send();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Clear chat', async () => {
|
||||
const test = new Clear();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Copy chat', async () => {
|
||||
const test = new Copy();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Save chat', async () => {
|
||||
const test = new Save();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Send private chat to other User', async () => {
|
||||
const test = new MultiUsers();
|
||||
let response;
|
||||
try {
|
||||
await test.init();
|
||||
await test.page1.closeAudioModal();
|
||||
await test.page2.closeAudioModal();
|
||||
response = await test.multiUsersPrivateChat();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Send public chat', async () => {
|
||||
const test = new MultiUsers();
|
||||
let response;
|
||||
try {
|
||||
await test.init();
|
||||
await test.page1.closeAudioModal();
|
||||
await test.page2.closeAudioModal();
|
||||
response = await test.multiUsersPublicChat();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Custom parameters', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'autoJoin';
|
||||
response = await test.autoJoin(testName, Page.getArgs(), undefined, c.autoJoin);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'listenOnlyMode';
|
||||
response = await test.listenOnlyMode(testName, Page.getArgsWithAudio(), undefined, c.listenOnlyMode);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'forceListenOnly';
|
||||
response = await test.forceListenOnly(testName, Page.getArgsWithAudio(), undefined, c.forceListenOnly);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// This test spec sets the userdata-skipCheck parameter to true
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'skipCheck';
|
||||
response = await test.skipCheck(testName, Page.getArgsWithAudio(), undefined, c.skipCheck);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'clientTitle';
|
||||
response = await test.clientTitle(testName, Page.getArgs(), undefined, c.clientTitle);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'askForFeedbackOnLogout';
|
||||
response = await test.askForFeedbackOnLogout(testName, Page.getArgs(), undefined, c.askForFeedbackOnLogout);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'displayBrandingArea';
|
||||
const parameterWithLogo = `${c.displayBrandingArea}&${c.logo}`;
|
||||
response = await test.displayBrandingArea(testName, Page.getArgs(), undefined, parameterWithLogo);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'shortcuts';
|
||||
response = await test.shortcuts(testName, Page.getArgs(), undefined, encodeURI(c.shortcuts));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'enableScreensharing';
|
||||
response = await test.enableScreensharing(testName, Page.getArgs(), undefined, c.enableScreensharing);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'enableVideo';
|
||||
response = await test.enableVideo(testName, Page.getArgsWithVideo(), undefined, c.enableVideo);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'autoShareWebcam';
|
||||
response = await test.autoShareWebcam(testName, Page.getArgsWithVideo(), undefined, c.autoShareWebcam);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'multiUserPenOnly';
|
||||
response = await test.multiUserPenOnly(testName, Page.getArgs(), undefined, c.multiUserPenOnly);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'presenterTools';
|
||||
response = await test.presenterTools(testName, Page.getArgs(), undefined, encodeURI(c.presenterTools));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'multiUserTools';
|
||||
response = await test.multiUserTools(testName, Page.getArgs(), undefined, encodeURI(c.multiUserTools));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'customStyle';
|
||||
response = await test.customStyle(testName, Page.getArgs(), undefined, encodeURIComponent(c.customStyle));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'customStyleUrl';
|
||||
response = await test.customStyleUrl(testName, Page.getArgs(), undefined, encodeURI(c.customStyleUrl));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'autoSwapLayout';
|
||||
response = await test.autoSwapLayout(testName, Page.getArgs(), undefined, encodeURI(c.autoSwapLayout));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'hidePresentation';
|
||||
response = await test.hidePresentation(testName, Page.getArgs(), undefined, encodeURI(c.hidePresentation));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'bannerText';
|
||||
response = await test.bannerText(testName, Page.getArgs(), undefined, c.bannerText);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'bannerColor';
|
||||
const colorToRGB = util.hexToRgb(c.color);
|
||||
response = await test.bannerColor(testName, Page.getArgs(), undefined, `${c.bannerColor}&${encodeURI(c.bannerText)}`, colorToRGB);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'showPublicChatOnLogin';
|
||||
response = await test.showPublicChatOnLogin(testName, Page.getArgs(), undefined, `${c.showPublicChatOnLogin}`);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'forceRestorePresentationOnNewEvents';
|
||||
response = await test.forceRestorePresentationOnNewEvents(testName, Page.getArgs(), undefined, `${c.forceRestorePresentationOnNewEvents}`);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Notifications', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(50000);
|
||||
});
|
||||
|
||||
test('Save settings notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'saveSettingsNotification';
|
||||
response = await test.saveSettingsNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
await test.page1.logger('Save Setting notification !');
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Public Chat notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'publicChatNotification';
|
||||
response = await test.publicChatNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
await test.page1.logger('Public Chat notification !');
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Private Chat notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'privateChatNotification';
|
||||
response = await test.privateChatNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
await test.page1.logger('Private Chat notification !');
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('User join notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'userJoinNotification';
|
||||
response = await test.getUserJoinPopupResponse(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.closePages();
|
||||
await test.page1.logger('User join notification !');
|
||||
}
|
||||
expect(response).toBe('User4 joined the session');
|
||||
});
|
||||
|
||||
test('Presentation upload notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'uploadPresentationNotification';
|
||||
response = await test.fileUploaderNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.closePage(test.page3);
|
||||
await test.page3.logger('Presentation upload notification !');
|
||||
}
|
||||
expect(response).toContain('Current presentation');
|
||||
});
|
||||
|
||||
test('Poll results notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'pollResultsNotification';
|
||||
response = await test.publishPollResults(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.closePage(test.page3);
|
||||
await test.page3.logger('Poll results notification !');
|
||||
}
|
||||
expect(response).toContain('Poll results were published to Public Chat and Whiteboard');
|
||||
});
|
||||
|
||||
test('Screenshare notification', async () => {
|
||||
const page = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'screenShareNotification';
|
||||
response = await page.screenshareToast(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await page.closePage(page.page3);
|
||||
await page.page3.logger('Screenshare notification !');
|
||||
}
|
||||
expect(response).toBe('Screenshare has started');
|
||||
});
|
||||
|
||||
test('Audio notifications', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'audioNotification';
|
||||
response = await test.audioNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.closePage(test.page3);
|
||||
await test.page3.logger('Audio notification !');
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Presentation', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Skip slide', async () => {
|
||||
const test = new Slide();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Upload presentation', async () => {
|
||||
const test = new Upload();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Screen Share', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Share screen', async () => {
|
||||
const test = new ShareScreen();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithVideo());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('User', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Change status', async () => {
|
||||
const test = new Status();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Multi user presence check', async () => {
|
||||
const test = new MultiUsers();
|
||||
let response;
|
||||
try {
|
||||
await test.init();
|
||||
await test.page1.closeAudioModal();
|
||||
await test.page2.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Virtualized List', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(3600000);
|
||||
});
|
||||
|
||||
test('Virtualized List Audio test', async () => {
|
||||
const test = new VirtualizedList();
|
||||
let response;
|
||||
try {
|
||||
await test.init();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
}, parseInt(process.env.TEST_DURATION_TIME));
|
||||
});
|
||||
|
||||
describe('Whiteboard', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Draw rectangle', async () => {
|
||||
const test = new Draw();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Webcam', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Shares webcam', async () => {
|
||||
const test = new Share();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithVideo());
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Checks content of webcam', async () => {
|
||||
const test = new Check();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithVideo());
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
describe('Audio', () => audioTest());
|
||||
describe('Chat', () => chatTest());
|
||||
describe('Breakout', () => breakoutTest());
|
||||
describe('Custom Parameters', () => customParametersTest());
|
||||
describe('Notifications', () => notificationsTest());
|
||||
describe('Presentation', () => presentationTest());
|
||||
describe('Screen Share', () => screenShareTest());
|
||||
describe('Shared Notes ', () => sharedNotesTest());
|
||||
describe('User', () => userTest());
|
||||
describe('Virtualized List', () => virtualizedListTest());
|
||||
describe('Webcam', () => webcamTest());
|
||||
describe('Whiteboard', () => whiteboardTest());
|
||||
|
38
bigbluebutton-html5/tests/puppeteer/audio.obj.js
Normal file
38
bigbluebutton-html5/tests/puppeteer/audio.obj.js
Normal file
@ -0,0 +1,38 @@
|
||||
const Audio = require('./audio/audio');
|
||||
const Page = require('./core/page');
|
||||
|
||||
const audioTest = () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Join audio with Listen Only', async () => {
|
||||
const test = new Audio();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithAudio());
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Join audio with Microphone', async () => {
|
||||
const test = new Audio();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithAudio());
|
||||
response = await test.microphone();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = exports = audioTest;
|
@ -1,36 +1,3 @@
|
||||
const Audio = require('./audio/audio');
|
||||
const Page = require('./core/page');
|
||||
const audioTest = require('./audio.obj');
|
||||
|
||||
describe('Audio', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Join audio with Listen Only', async () => {
|
||||
const test = new Audio();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithAudio());
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Join audio with Microphone', async () => {
|
||||
const test = new Audio();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithAudio());
|
||||
response = await test.microphone();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
describe('Audio', () => audioTest());
|
||||
|
99
bigbluebutton-html5/tests/puppeteer/breakout.obj.js
Normal file
99
bigbluebutton-html5/tests/puppeteer/breakout.obj.js
Normal file
@ -0,0 +1,99 @@
|
||||
const Join = require('./breakout/join');
|
||||
const Create = require('./breakout/create');
|
||||
const Page = require('./core/page');
|
||||
|
||||
const breakoutTest = () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(150000);
|
||||
});
|
||||
|
||||
// Create Breakout Room
|
||||
test('Create Breakout room', async () => {
|
||||
const test = new Create();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'createBreakoutrooms';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
response = await test.testCreatedBreakout(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// Join Breakout Room
|
||||
test('Join Breakout room', async () => {
|
||||
const test = new Join();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'joinBreakoutroomsWithoutFeatures';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
await test.join(testName);
|
||||
response = await test.testJoined(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// Join Breakout Room with Video
|
||||
test('Join Breakout room with Video', async () => {
|
||||
const test = new Join();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'joinBreakoutroomsWithVideo';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
await test.join(testName);
|
||||
response = await test.testJoined(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// Join Breakout Room and start Screen Share
|
||||
test('Join Breakout room and share screen', async () => {
|
||||
const test = new Join();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'joinBreakoutroomsAndShareScreen';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
await test.join(testName);
|
||||
response = await test.testJoined(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// Join Breakout Room with Audio
|
||||
test('Join Breakout room with Audio', async () => {
|
||||
const test = new Join();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'joinBreakoutroomsWithAudio';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
await test.join(testName);
|
||||
response = await test.testJoined(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
};
|
||||
module.exports = exports = breakoutTest;
|
@ -1,98 +1,3 @@
|
||||
const Join = require('./breakout/join');
|
||||
const Create = require('./breakout/create');
|
||||
const Page = require('./core/page');
|
||||
const breakoutTest = require('./breakout.obj');
|
||||
|
||||
describe('Breakoutrooms', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(150000);
|
||||
});
|
||||
|
||||
// Create Breakout Room
|
||||
test('Create Breakout room', async () => {
|
||||
const test = new Create();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'createBreakoutrooms';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
response = await test.testCreatedBreakout(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// Join Breakout Room
|
||||
test('Join Breakout room', async () => {
|
||||
const test = new Join();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'joinBreakoutroomsWithoutFeatures';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
await test.join(testName);
|
||||
response = await test.testJoined(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// Join Breakout Room with Video
|
||||
test('Join Breakout room with Video', async () => {
|
||||
const test = new Join();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'joinBreakoutroomsWithVideo';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
await test.join(testName);
|
||||
response = await test.testJoined(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// Join Breakout Room and start Screen Share
|
||||
test('Join Breakout room and share screen', async () => {
|
||||
const test = new Join();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'joinBreakoutroomsAndShareScreen';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
await test.join(testName);
|
||||
response = await test.testJoined(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// Join Breakout Room with Audio
|
||||
test('Join Breakout room with Audio', async () => {
|
||||
const test = new Join();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'joinBreakoutroomsWithAudio';
|
||||
await test.init(undefined);
|
||||
await test.create(testName);
|
||||
await test.join(testName);
|
||||
response = await test.testJoined(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
describe('Breakout', () => breakoutTest());
|
||||
|
105
bigbluebutton-html5/tests/puppeteer/chat.obj.js
Normal file
105
bigbluebutton-html5/tests/puppeteer/chat.obj.js
Normal file
@ -0,0 +1,105 @@
|
||||
const Page = require('./core/page');
|
||||
const Send = require('./chat/send');
|
||||
const Clear = require('./chat/clear');
|
||||
const Copy = require('./chat/copy');
|
||||
const Save = require('./chat/save');
|
||||
const MultiUsers = require('./user/multiusers');
|
||||
|
||||
const chatTest = () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Send message', async () => {
|
||||
const test = new Send();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Clear chat', async () => {
|
||||
const test = new Clear();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Copy chat', async () => {
|
||||
const test = new Copy();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Save chat', async () => {
|
||||
const test = new Save();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Send private chat to other User', async () => {
|
||||
const test = new MultiUsers();
|
||||
let response;
|
||||
try {
|
||||
await test.init();
|
||||
await test.page1.closeAudioModal();
|
||||
await test.page2.closeAudioModal();
|
||||
response = await test.multiUsersPrivateChat();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Send public chat', async () => {
|
||||
const test = new MultiUsers();
|
||||
let response;
|
||||
try {
|
||||
await test.init();
|
||||
await test.page1.closeAudioModal();
|
||||
await test.page2.closeAudioModal();
|
||||
response = await test.multiUsersPublicChat();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
};
|
||||
module.exports = exports = chatTest;
|
@ -1,104 +1,3 @@
|
||||
const Page = require('./core/page');
|
||||
const Send = require('./chat/send');
|
||||
const Clear = require('./chat/clear');
|
||||
const Copy = require('./chat/copy');
|
||||
const Save = require('./chat/save');
|
||||
const MultiUsers = require('./user/multiusers');
|
||||
const chatTest = require('./chat.obj');
|
||||
|
||||
describe('Chat', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Send message', async () => {
|
||||
const test = new Send();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Clear chat', async () => {
|
||||
const test = new Clear();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Copy chat', async () => {
|
||||
const test = new Copy();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Save chat', async () => {
|
||||
const test = new Save();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Send private chat to other User', async () => {
|
||||
const test = new MultiUsers();
|
||||
let response;
|
||||
try {
|
||||
await test.init();
|
||||
await test.page1.closeAudioModal();
|
||||
await test.page2.closeAudioModal();
|
||||
response = await test.multiUsersPrivateChat();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Send public chat', async () => {
|
||||
const test = new MultiUsers();
|
||||
let response;
|
||||
try {
|
||||
await test.init();
|
||||
await test.page1.closeAudioModal();
|
||||
await test.page2.closeAudioModal();
|
||||
response = await test.multiUsersPublicChat();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
describe('Chat', () => chatTest());
|
||||
|
433
bigbluebutton-html5/tests/puppeteer/customparameters.obj.js
Normal file
433
bigbluebutton-html5/tests/puppeteer/customparameters.obj.js
Normal file
@ -0,0 +1,433 @@
|
||||
const Page = require('./core/page');
|
||||
const CustomParameters = require('./customparameters/customparameters');
|
||||
const c = require('./customparameters/constants');
|
||||
const util = require('./customparameters/util');
|
||||
|
||||
const customParametersTest = () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'autoJoin';
|
||||
response = await test.autoJoin(testName, Page.getArgs(), undefined, c.autoJoin);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'listenOnlyMode';
|
||||
response = await test.listenOnlyMode(testName, Page.getArgsWithAudio(), undefined, c.listenOnlyMode);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'forceListenOnly';
|
||||
response = await test.forceListenOnly(testName, Page.getArgsWithAudio(), undefined, c.forceListenOnly);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// This test spec sets the userdata-skipCheck parameter to true
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'skipCheck';
|
||||
response = await test.skipCheck(testName, Page.getArgsWithAudio(), undefined, c.skipCheck);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'clientTitle';
|
||||
response = await test.clientTitle(testName, Page.getArgs(), undefined, c.clientTitle);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'askForFeedbackOnLogout';
|
||||
response = await test.askForFeedbackOnLogout(testName, Page.getArgs(), undefined, c.askForFeedbackOnLogout);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'displayBrandingArea';
|
||||
const parameterWithLogo = `${c.displayBrandingArea}&${c.logo}`;
|
||||
response = await test.displayBrandingArea(testName, Page.getArgs(), undefined, parameterWithLogo);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'shortcuts';
|
||||
response = await test.shortcuts(testName, Page.getArgs(), undefined, encodeURI(c.shortcuts));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'enableScreensharing';
|
||||
response = await test.enableScreensharing(testName, Page.getArgs(), undefined, c.enableScreensharing);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'enableVideo';
|
||||
response = await test.enableVideo(testName, Page.getArgsWithVideo(), undefined, c.enableVideo);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'autoShareWebcam';
|
||||
response = await test.autoShareWebcam(testName, Page.getArgsWithVideo(), undefined, c.autoShareWebcam);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'multiUserPenOnly';
|
||||
response = await test.multiUserPenOnly(testName, Page.getArgs(), undefined, c.multiUserPenOnly);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'presenterTools';
|
||||
response = await test.presenterTools(testName, Page.getArgs(), undefined, encodeURI(c.presenterTools));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'multiUserTools';
|
||||
response = await test.multiUserTools(testName, Page.getArgs(), undefined, encodeURI(c.multiUserTools));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'customStyle';
|
||||
response = await test.customStyle(testName, Page.getArgs(), undefined, encodeURIComponent(c.customStyle));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'customStyleUrl';
|
||||
response = await test.customStyleUrl(testName, Page.getArgs(), undefined, encodeURI(c.customStyleUrl));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'autoSwapLayout';
|
||||
response = await test.autoSwapLayout(testName, Page.getArgs(), undefined, encodeURI(c.autoSwapLayout));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'hidePresentation';
|
||||
response = await test.hidePresentation(testName, Page.getArgs(), undefined, encodeURI(c.hidePresentation));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'bannerText';
|
||||
response = await test.bannerText(testName, Page.getArgs(), undefined, c.bannerText);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'bannerColor';
|
||||
const colorToRGB = util.hexToRgb(c.color);
|
||||
response = await test.bannerColor(testName, Page.getArgs(), undefined, `${c.bannerColor}&${encodeURI(c.bannerText)}`, colorToRGB);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'showPublicChatOnLogin';
|
||||
response = await test.showPublicChatOnLogin(testName, Page.getArgs(), undefined, `${c.showPublicChatOnLogin}`);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'forceRestorePresentationOnNewEvents';
|
||||
response = await test.forceRestorePresentationOnNewEvents(testName, Page.getArgs(), undefined, `${c.forceRestorePresentationOnNewEvents}`);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
};
|
||||
module.exports = exports = customParametersTest;
|
@ -1,432 +1,3 @@
|
||||
const Page = require('./core/page');
|
||||
const CustomParameters = require('./customparameters/customparameters');
|
||||
const c = require('./customparameters/constants');
|
||||
const util = require('./customparameters/util');
|
||||
const customParametersTest = require('./customparameters.obj');
|
||||
|
||||
describe('Custom parameters', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'autoJoin';
|
||||
response = await test.autoJoin(testName, Page.getArgs(), undefined, c.autoJoin);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'listenOnlyMode';
|
||||
response = await test.listenOnlyMode(testName, Page.getArgsWithAudio(), undefined, c.listenOnlyMode);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'forceListenOnly';
|
||||
response = await test.forceListenOnly(testName, Page.getArgsWithAudio(), undefined, c.forceListenOnly);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// This test spec sets the userdata-skipCheck parameter to true
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'skipCheck';
|
||||
response = await test.skipCheck(testName, Page.getArgsWithAudio(), undefined, c.skipCheck);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'clientTitle';
|
||||
response = await test.clientTitle(testName, Page.getArgs(), undefined, c.clientTitle);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'askForFeedbackOnLogout';
|
||||
response = await test.askForFeedbackOnLogout(testName, Page.getArgs(), undefined, c.askForFeedbackOnLogout);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'displayBrandingArea';
|
||||
const parameterWithLogo = `${c.displayBrandingArea}&${c.logo}`;
|
||||
response = await test.displayBrandingArea(testName, Page.getArgs(), undefined, parameterWithLogo);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'shortcuts';
|
||||
response = await test.shortcuts(testName, Page.getArgs(), undefined, encodeURI(c.shortcuts));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'enableScreensharing';
|
||||
response = await test.enableScreensharing(testName, Page.getArgs(), undefined, c.enableScreensharing);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'enableVideo';
|
||||
response = await test.enableVideo(testName, Page.getArgsWithVideo(), undefined, c.enableVideo);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'autoShareWebcam';
|
||||
response = await test.autoShareWebcam(testName, Page.getArgsWithVideo(), undefined, c.autoShareWebcam);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'multiUserPenOnly';
|
||||
response = await test.multiUserPenOnly(testName, Page.getArgs(), undefined, c.multiUserPenOnly);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'presenterTools';
|
||||
response = await test.presenterTools(testName, Page.getArgs(), undefined, encodeURI(c.presenterTools));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'multiUserTools';
|
||||
response = await test.multiUserTools(testName, Page.getArgs(), undefined, encodeURI(c.multiUserTools));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'customStyle';
|
||||
response = await test.customStyle(testName, Page.getArgs(), undefined, encodeURIComponent(c.customStyle));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'customStyleUrl';
|
||||
response = await test.customStyleUrl(testName, Page.getArgs(), undefined, encodeURI(c.customStyleUrl));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'autoSwapLayout';
|
||||
response = await test.autoSwapLayout(testName, Page.getArgs(), undefined, encodeURI(c.autoSwapLayout));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'hidePresentation';
|
||||
response = await test.hidePresentation(testName, Page.getArgs(), undefined, encodeURI(c.hidePresentation));
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'bannerText';
|
||||
response = await test.bannerText(testName, Page.getArgs(), undefined, c.bannerText);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'bannerColor';
|
||||
const colorToRGB = util.hexToRgb(c.color);
|
||||
response = await test.bannerColor(testName, Page.getArgs(), undefined, `${c.bannerColor}&${encodeURI(c.bannerText)}`, colorToRGB);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'showPublicChatOnLogin';
|
||||
response = await test.showPublicChatOnLogin(testName, Page.getArgs(), undefined, `${c.showPublicChatOnLogin}`);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.closePage(test.page1);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
// 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;
|
||||
try {
|
||||
page.logger('before');
|
||||
const testName = 'forceRestorePresentationOnNewEvents';
|
||||
response = await test.forceRestorePresentationOnNewEvents(testName, Page.getArgs(), undefined, `${c.forceRestorePresentationOnNewEvents}`);
|
||||
page.logger('after');
|
||||
} catch (e) {
|
||||
page.logger(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
describe('Custom Parameters', () => customParametersTest());
|
||||
|
131
bigbluebutton-html5/tests/puppeteer/notifications.obj.js
Normal file
131
bigbluebutton-html5/tests/puppeteer/notifications.obj.js
Normal file
@ -0,0 +1,131 @@
|
||||
const Notifications = require('./notifications/notifications');
|
||||
const ShareScreen = require('./screenshare/screenshare');
|
||||
const Audio = require('./audio/audio');
|
||||
const Page = require('./core/page');
|
||||
|
||||
const notificationsTest = () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Save settings notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'saveSettingsNotification';
|
||||
response = await test.saveSettingsNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
await test.page1.logger('Save Setting notification !');
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Public Chat notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'publicChatNotification';
|
||||
response = await test.publicChatNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
await test.page1.logger('Public Chat notification !');
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Private Chat notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'privateChatNotification';
|
||||
response = await test.privateChatNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
await test.page1.logger('Private Chat notification !');
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('User join notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'userJoinNotification';
|
||||
response = await test.getUserJoinPopupResponse(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.closePages();
|
||||
await test.page1.logger('User join notification !');
|
||||
}
|
||||
expect(response).toBe('User4 joined the session');
|
||||
});
|
||||
|
||||
test('Presentation upload notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'uploadPresentationNotification';
|
||||
response = await test.fileUploaderNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.closePage(test.page3);
|
||||
await test.page3.logger('Presentation upload notification !');
|
||||
}
|
||||
expect(response).toContain('Current presentation');
|
||||
});
|
||||
|
||||
test('Poll results notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'pollResultsNotification';
|
||||
response = await test.publishPollResults(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.closePage(test.page3);
|
||||
await test.page3.logger('Poll results notification !');
|
||||
}
|
||||
expect(response).toContain('Poll results were published to Public Chat and Whiteboard');
|
||||
});
|
||||
|
||||
test('Screenshare notification', async () => {
|
||||
const page = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'screenShareNotification';
|
||||
response = await page.screenshareToast(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await page.closePage(page.page3);
|
||||
await page.page3.logger('Screenshare notification !');
|
||||
}
|
||||
expect(response).toBe('Screenshare has started');
|
||||
});
|
||||
|
||||
test('Audio notifications', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'audioNotification';
|
||||
response = await test.audioNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.closePage(test.page3);
|
||||
await test.page3.logger('Audio notification !');
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
};
|
||||
module.exports = exports = notificationsTest;
|
@ -1,130 +1,3 @@
|
||||
const Notifications = require('./notifications/notifications');
|
||||
const ShareScreen = require('./screenshare/screenshare');
|
||||
const Audio = require('./audio/audio');
|
||||
const Page = require('./core/page');
|
||||
const notificationsTest = require('./notifications.obj');
|
||||
|
||||
describe('Notifications', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Save settings notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'saveSettingsNotification';
|
||||
response = await test.saveSettingsNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
await test.page1.logger('Save Setting notification !');
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Public Chat notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'publicChatNotification';
|
||||
response = await test.publicChatNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
await test.page1.logger('Public Chat notification !');
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Private Chat notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'privateChatNotification';
|
||||
response = await test.privateChatNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
await test.page1.logger('Private Chat notification !');
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('User join notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'userJoinNotification';
|
||||
response = await test.getUserJoinPopupResponse(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.closePages();
|
||||
await test.page1.logger('User join notification !');
|
||||
}
|
||||
expect(response).toBe('User4 joined the session');
|
||||
});
|
||||
|
||||
test('Presentation upload notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'uploadPresentationNotification';
|
||||
response = await test.fileUploaderNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.closePage(test.page3);
|
||||
await test.page3.logger('Presentation upload notification !');
|
||||
}
|
||||
expect(response).toContain('Current presentation');
|
||||
});
|
||||
|
||||
test('Poll results notification', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'pollResultsNotification';
|
||||
response = await test.publishPollResults(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.closePage(test.page3);
|
||||
await test.page3.logger('Poll results notification !');
|
||||
}
|
||||
expect(response).toContain('Poll results were published to Public Chat and Whiteboard');
|
||||
});
|
||||
|
||||
test('Screenshare notification', async () => {
|
||||
const page = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'screenShareNotification';
|
||||
response = await page.screenshareToast(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await page.closePage(page.page3);
|
||||
await page.page3.logger('Screenshare notification !');
|
||||
}
|
||||
expect(response).toBe('Screenshare has started');
|
||||
});
|
||||
|
||||
test('Audio notifications', async () => {
|
||||
const test = new Notifications();
|
||||
let response;
|
||||
try {
|
||||
const testName = 'audioNotification';
|
||||
response = await test.audioNotification(testName);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.closePage(test.page3);
|
||||
await test.page3.logger('Audio notification !');
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
describe('Notifications', () => notificationsTest());
|
||||
|
@ -588,15 +588,6 @@
|
||||
"babel-template": "^6.24.1"
|
||||
}
|
||||
},
|
||||
"babel-jest": {
|
||||
"version": "23.6.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-23.6.0.tgz",
|
||||
"integrity": "sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew==",
|
||||
"requires": {
|
||||
"babel-plugin-istanbul": "^4.1.6",
|
||||
"babel-preset-jest": "^23.2.0"
|
||||
}
|
||||
},
|
||||
"babel-messages": {
|
||||
"version": "6.23.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
|
||||
@ -2229,6 +2220,17 @@
|
||||
"jest-validate": "^23.6.0",
|
||||
"micromatch": "^2.3.11",
|
||||
"pretty-format": "^23.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-jest": {
|
||||
"version": "23.6.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-23.6.0.tgz",
|
||||
"integrity": "sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew==",
|
||||
"requires": {
|
||||
"babel-plugin-istanbul": "^4.1.6",
|
||||
"babel-preset-jest": "^23.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"jest-diff": {
|
||||
|
40
bigbluebutton-html5/tests/puppeteer/presentation.obj.js
Normal file
40
bigbluebutton-html5/tests/puppeteer/presentation.obj.js
Normal file
@ -0,0 +1,40 @@
|
||||
const Page = require('./core/page');
|
||||
const Slide = require('./presentation/slide');
|
||||
const Upload = require('./presentation/upload');
|
||||
|
||||
const presentationTest = () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Skip slide', async () => {
|
||||
const test = new Slide();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Upload presentation', async () => {
|
||||
const test = new Upload();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
};
|
||||
module.exports = exports = presentationTest;
|
@ -1,39 +1,3 @@
|
||||
const Page = require('./core/page');
|
||||
const Slide = require('./presentation/slide');
|
||||
const Upload = require('./presentation/upload');
|
||||
const presentationTest = require('./presentation.obj');
|
||||
|
||||
describe('Presentation', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Skip slide', async () => {
|
||||
const test = new Slide();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Upload presentation', async () => {
|
||||
const test = new Upload();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
describe('Presentation', () => presentationTest());
|
||||
|
88
bigbluebutton-html5/tests/puppeteer/run.sh
Executable file
88
bigbluebutton-html5/tests/puppeteer/run.sh
Executable file
@ -0,0 +1,88 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
usage() {
|
||||
set +x
|
||||
cat 1>&2 <<HERE
|
||||
BBB Health Check
|
||||
|
||||
OPTIONS:
|
||||
-t <test name: whiteboard/webcam/virtualizedlist/user/sharednotes/screenshare/presentation/notifications/customparameters/chat/breakout/audio/all>
|
||||
-h <hostname name of BigBlueButton server>
|
||||
-s <Shared secret>
|
||||
|
||||
-u Print usage
|
||||
HERE
|
||||
|
||||
}
|
||||
|
||||
err() {
|
||||
echo "----";
|
||||
echo ERROR: $@
|
||||
echo "----";
|
||||
}
|
||||
|
||||
main() {
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
while builtin getopts "uh:s:t:" opt "${@}"; do
|
||||
|
||||
case $opt in
|
||||
t)
|
||||
TEST=$OPTARG
|
||||
;;
|
||||
|
||||
h)
|
||||
HOST=$OPTARG
|
||||
;;
|
||||
|
||||
s)
|
||||
SECRET=$OPTARG
|
||||
;;
|
||||
|
||||
u)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
|
||||
:)
|
||||
err "Missing option argument for -$OPTARG"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
\?)
|
||||
err "Invalid option: -$OPTARG" >&2
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$TEST" ]; then
|
||||
err "No test provided";
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$HOST" ]; then
|
||||
err "No host provided";
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$SECRET" ]; then
|
||||
err "No scret provided";
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
IS_AUDIO_TEST=false
|
||||
|
||||
if [ "$TEST" = "audio" ]; then
|
||||
IS_AUDIO_TEST=true;
|
||||
fi;
|
||||
|
||||
env $(cat tests/puppeteer/.env | xargs) jest $TEST.test.js --color --detectOpenHandles
|
||||
}
|
||||
|
||||
|
||||
main "$@" || exit 1
|
||||
|
24
bigbluebutton-html5/tests/puppeteer/screenshare.obj.js
Normal file
24
bigbluebutton-html5/tests/puppeteer/screenshare.obj.js
Normal file
@ -0,0 +1,24 @@
|
||||
const ShareScreen = require('./screenshare/screenshare');
|
||||
const Page = require('./core/page');
|
||||
|
||||
const screenShareTest = () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Share screen', async () => {
|
||||
const test = new ShareScreen();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithVideo());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
};
|
||||
module.exports = exports = screenShareTest;
|
@ -1,23 +1,3 @@
|
||||
const ShareScreen = require('./screenshare/screenshare');
|
||||
const Page = require('./core/page');
|
||||
const screenShareTest = require('./screenshare.obj');
|
||||
|
||||
describe('Screen Share', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Share screen', async () => {
|
||||
const test = new ShareScreen();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithVideo());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
describe('Screen Share', () => screenShareTest());
|
||||
|
24
bigbluebutton-html5/tests/puppeteer/sharednotes.obj.js
Normal file
24
bigbluebutton-html5/tests/puppeteer/sharednotes.obj.js
Normal file
@ -0,0 +1,24 @@
|
||||
const SharedNotes = require('./notes/sharednotes');
|
||||
|
||||
const sharedNotesTest = () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Open Shared notes', async () => {
|
||||
const test = new SharedNotes();
|
||||
let response;
|
||||
try {
|
||||
await test.init();
|
||||
await test.page1.closeAudioModal();
|
||||
await test.page2.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
};
|
||||
module.exports = exports = sharedNotesTest;
|
@ -1,23 +1,3 @@
|
||||
const SharedNotes = require('./notes/sharednotes');
|
||||
const sharedNotesTest = require('./sharednotes.obj');
|
||||
|
||||
describe('Shared notes', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Open Shared notes', async () => {
|
||||
const test = new SharedNotes();
|
||||
let response;
|
||||
try {
|
||||
await test.init();
|
||||
await test.page1.closeAudioModal();
|
||||
await test.page2.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
describe('Shared Notes ', () => sharedNotesTest());
|
||||
|
41
bigbluebutton-html5/tests/puppeteer/user.obj.js
Normal file
41
bigbluebutton-html5/tests/puppeteer/user.obj.js
Normal file
@ -0,0 +1,41 @@
|
||||
const Page = require('./core/page');
|
||||
const Status = require('./user/status');
|
||||
const MultiUsers = require('./user/multiusers');
|
||||
|
||||
const userTest = () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Change status', async () => {
|
||||
const test = new Status();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Multi user presence check', async () => {
|
||||
const test = new MultiUsers();
|
||||
let response;
|
||||
try {
|
||||
await test.init();
|
||||
await test.page1.closeAudioModal();
|
||||
await test.page2.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
};
|
||||
module.exports = exports = userTest;
|
@ -1,40 +1,3 @@
|
||||
const Page = require('./core/page');
|
||||
const Status = require('./user/status');
|
||||
const MultiUsers = require('./user/multiusers');
|
||||
const userTest = require('./user.obj');
|
||||
|
||||
describe('User', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Change status', async () => {
|
||||
const test = new Status();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Multi user presence check', async () => {
|
||||
const test = new MultiUsers();
|
||||
let response;
|
||||
try {
|
||||
await test.init();
|
||||
await test.page1.closeAudioModal();
|
||||
await test.page2.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
} finally {
|
||||
await test.close(test.page1, test.page2);
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
describe('User', () => userTest());
|
||||
|
18
bigbluebutton-html5/tests/puppeteer/virtualizedlist.obj.js
Normal file
18
bigbluebutton-html5/tests/puppeteer/virtualizedlist.obj.js
Normal file
@ -0,0 +1,18 @@
|
||||
const VirtualizedList = require('./virtualizedlist/virtualize');
|
||||
|
||||
const virtualizedListTest = () => {
|
||||
test('Virtualized List Audio test', async () => {
|
||||
const test = new VirtualizedList();
|
||||
let response;
|
||||
try {
|
||||
await test.init();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
}, parseInt(process.env.TEST_DURATION_TIME));
|
||||
};
|
||||
module.exports = exports = virtualizedListTest;
|
@ -1,17 +1,3 @@
|
||||
const VirtualizedList = require('./virtualizedlist/virtualize');
|
||||
const virtualizedListTest = require('./virtualizedlist.obj');
|
||||
|
||||
describe('Virtualized List', () => {
|
||||
test('Virtualized List Audio test', async () => {
|
||||
const test = new VirtualizedList();
|
||||
let response;
|
||||
try {
|
||||
await test.init();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
}, parseInt(process.env.TEST_DURATION_TIME));
|
||||
});
|
||||
describe('Virtualized List', () => virtualizedListTest());
|
||||
|
38
bigbluebutton-html5/tests/puppeteer/webcam.obj.js
Normal file
38
bigbluebutton-html5/tests/puppeteer/webcam.obj.js
Normal file
@ -0,0 +1,38 @@
|
||||
const Share = require('./webcam/share');
|
||||
const Check = require('./webcam/check');
|
||||
const Page = require('./core/page');
|
||||
|
||||
const webcamTest = () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Shares webcam', async () => {
|
||||
const test = new Share();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithVideo());
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Checks content of webcam', async () => {
|
||||
const test = new Check();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithVideo());
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
};
|
||||
module.exports = exports = webcamTest;
|
@ -1,37 +1,3 @@
|
||||
const Share = require('./webcam/share');
|
||||
const Check = require('./webcam/check');
|
||||
const Page = require('./core/page');
|
||||
const webcamTest = require('./webcam.obj');
|
||||
|
||||
describe('Webcam', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Shares webcam', async () => {
|
||||
const test = new Share();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithVideo());
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
|
||||
test('Checks content of webcam', async () => {
|
||||
const test = new Check();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgsWithVideo());
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
describe('Webcam', () => webcamTest());
|
||||
|
24
bigbluebutton-html5/tests/puppeteer/whiteboard.obj.js
Normal file
24
bigbluebutton-html5/tests/puppeteer/whiteboard.obj.js
Normal file
@ -0,0 +1,24 @@
|
||||
const Page = require('./core/page');
|
||||
const Draw = require('./whiteboard/draw');
|
||||
|
||||
const whiteboardTest = () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Draw rectangle', async () => {
|
||||
const test = new Draw();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
};
|
||||
module.exports = exports = whiteboardTest;
|
@ -1,23 +1,3 @@
|
||||
const Page = require('./core/page');
|
||||
const Draw = require('./whiteboard/draw');
|
||||
const whiteboardTest = require('./whiteboard.obj');
|
||||
|
||||
describe('Whiteboard', () => {
|
||||
beforeEach(() => {
|
||||
jest.setTimeout(30000);
|
||||
});
|
||||
|
||||
test('Draw rectangle', async () => {
|
||||
const test = new Draw();
|
||||
let response;
|
||||
try {
|
||||
await test.init(Page.getArgs());
|
||||
await test.closeAudioModal();
|
||||
response = await test.test();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
await test.close();
|
||||
}
|
||||
expect(response).toBe(true);
|
||||
});
|
||||
});
|
||||
describe('Whiteboard', () => whiteboardTest());
|
||||
|
Loading…
Reference in New Issue
Block a user