Merge pull request #13604 from antobinary/merge-24-dev

chore: Merge 2.4 into develop
This commit is contained in:
Anton Georgiev 2021-10-29 09:34:56 -04:00 committed by GitHub
commit f6871a7352
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 756 additions and 528 deletions

View File

@ -11,8 +11,8 @@ stages:
# define which docker image to use for builds
default:
image: gitlab.senfcall.de:5050/senfcall-public/docker-bbb-build:v2021-10-17
image: gitlab.senfcall.de:5050/senfcall-public/docker-bbb-build:v2021-10-25
# This stage uses git to find out since when each package has been unmodified.
# it then checks an API endpoint on the package server to find out for which of
# these versions a build exists. If a viable build (from a commit where the

View File

@ -1 +1 @@
git clone --branch v2.6.0-beta.5 --depth 1 https://github.com/bigbluebutton/bbb-webrtc-sfu bbb-webrtc-sfu
git clone --branch v2.6.0-beta.10 --depth 1 https://github.com/bigbluebutton/bbb-webrtc-sfu bbb-webrtc-sfu

View File

@ -1 +1 @@
BIGBLUEBUTTON_RELEASE=2.4-rc-3
BIGBLUEBUTTON_RELEASE=2.4-rc-4

View File

@ -17,7 +17,6 @@
*/
/* eslint no-unused-vars: 0 */
import './wdyr';
import '../imports/ui/services/collection-hooks/collection-hooks';
import React from 'react';

View File

@ -1,19 +0,0 @@
import React from 'react';
/*
To enable a detailed log of why a specific component is rendering,
execute this code in your browser's console:
require('/imports/ui/components/nav-bar/component.jsx').default.whyDidYouRender = {
logOnDifferentValues: true,
customName: 'Navbar',
}
*/
if (process.env.NODE_ENV === 'development') {
const whyDidYouRender = require('@welldone-software/why-did-you-render');
whyDidYouRender(React, {
trackAllPureComponents: false,
});
}

View File

@ -56,7 +56,6 @@ class TalkingIndicator extends PureComponent {
const {
talking,
color,
voiceUserId,
muted,
callerName,
} = talkers[`${id}`];
@ -82,7 +81,7 @@ class TalkingIndicator extends PureComponent {
<Button
key={_.uniqueId(`${callerName}-`)}
className={cx(style)}
onClick={() => this.handleMuteUser(voiceUserId)}
onClick={() => this.handleMuteUser(id)}
label={callerName}
tooltipLabel={!muted && amIModerator
? `${intl.formatMessage(intlMessages.muteLabel)} ${callerName}`

View File

@ -47,7 +47,6 @@ export default withTracker(() => {
talking: 1,
color: 1,
startTime: 1,
voiceUserId: 1,
muted: 1,
intId: 1,
},
@ -64,13 +63,12 @@ export default withTracker(() => {
for (let i = 0; i < maxNumberVoiceUsersNotification; i += 1) {
const {
callerName, talking, color, voiceUserId, muted, intId,
callerName, talking, color, muted, intId,
} = usersTalking[i];
talkers[`${intId}`] = {
color,
talking,
voiceUserId,
muted,
callerName,
};
@ -78,7 +76,7 @@ export default withTracker(() => {
}
const muteUser = debounce((id) => {
const user = VoiceUsers.findOne({ meetingId, voiceUserId: id }, {
const user = VoiceUsers.findOne({ meetingId, intId: id }, {
fields: {
muted: 1,
},

View File

@ -622,7 +622,7 @@ class Poll extends Component {
&& (
<Button
className={styles.addItemBtn}
data-test="addItem"
data-test="addPollItem"
label={intl.formatMessage(intlMessages.addOptionLabel)}
aria-describedby="add-item-button"
color="default"

View File

@ -4,6 +4,7 @@ import _ from 'lodash';
import { defineMessages, injectIntl } from 'react-intl';
import Button from '/imports/ui/components/button/component';
import caseInsensitiveReducer from '/imports/utils/caseInsensitiveReducer';
import { Session } from 'meteor/session';
import { styles } from './styles';
import Service from './service';
@ -20,6 +21,10 @@ const intlMessages = defineMessages({
id: 'app.poll.publishLabel',
description: 'label for the publish button',
},
cancelPollLabel: {
id: 'app.poll.cancelPollLabel',
description: 'label for cancel poll button',
},
backLabel: {
id: 'app.poll.backLabel',
description: 'label for the return to poll options button',
@ -204,18 +209,31 @@ class LiveResult extends PureComponent {
</div>
{currentPoll && currentPoll.answers.length > 0
? (
<Button
disabled={!isMeteorConnected}
onClick={() => {
Session.set('pollInitiated', false);
Service.publishPoll();
stopPoll();
}}
label={intl.formatMessage(intlMessages.publishLabel)}
data-test="publishLabel"
color="primary"
className={styles.btn}
/>
<div className={styles.buttonsActions}>
<Button
disabled={!isMeteorConnected}
onClick={() => {
Session.set('pollInitiated', false);
Service.publishPoll();
stopPoll();
}}
label={intl.formatMessage(intlMessages.publishLabel)}
data-test="publishPollingLabel"
color="primary"
className={styles.publishBtn}
/>
<Button
disabled={!isMeteorConnected}
onClick={() => {
Session.set('pollInitiated', false);
Session.set('resetPollPanel', true);
stopPoll();
}}
label={intl.formatMessage(intlMessages.cancelPollLabel)}
data-test="cancelPollLabel"
className={styles.cancelBtn}
/>
</div>
) : (
<Button
disabled={!isMeteorConnected}

View File

@ -18,6 +18,19 @@
white-space: pre-wrap;
}
.publishBtn,
.cancelBtn {
width: 48%;
overflow-wrap: break-word;
white-space: pre-wrap;
}
.buttonsActions {
display: flex;
width: 100%;
justify-content: space-between;
}
.main {
display: flex;
justify-content: space-between;

View File

@ -30,7 +30,8 @@
.mainText {
color: var(--color-white);
font-size: 2rem;
font-size: 1.3rem;
font-weight: 600;
}
.screenshareContainerDefault {

View File

@ -96,6 +96,14 @@ const intlMessages = defineMessages({
id: 'app.layout.style.videoFocusPush',
description: 'label for videoFocus layout style (push to all)',
},
smartPushLayout: {
id: 'app.layout.style.smartPush',
description: 'label for smart layout style (push to all)',
},
customPushLayout: {
id: 'app.layout.style.customPush',
description: 'label for custom layout style (push to all)',
},
});
class ApplicationMenu extends BaseMenu {
@ -317,6 +325,8 @@ class ApplicationMenu extends BaseMenu {
if (isModerator) {
const pushLayouts = {
CUSTOM_PUSH: 'customPush',
SMART_PUSH: 'smartPush',
PRESENTATION_FOCUS_PUSH: 'presentationFocusPush',
VIDEO_FOCUS_PUSH: 'videoFocusPush',
};

View File

@ -651,15 +651,6 @@
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.1.tgz",
"integrity": "sha512-EaCxbanVeyxDRTQBkdLb3Bvl/HK7PBK6UJjsSixB0iHKoWxE5uu2Q/DgtpOhPIojN0Zl1whvOd7PoHs2P0s5eA=="
},
"@welldone-software/why-did-you-render": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@welldone-software/why-did-you-render/-/why-did-you-render-6.2.0.tgz",
"integrity": "sha512-ViwaE09Vgb0yXzyZuGTWCmWy/nBRAEGyztMdFYuxIgmL8yoXX5TVMCfieiJGdRQQPiDUznlYmcu0lu8kN1lwtQ==",
"dev": true,
"requires": {
"lodash": "^4"
}
},
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
@ -3904,6 +3895,11 @@
"lru-cache": "^6.0.0"
}
},
"trim-newlines": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.0.2.tgz",
"integrity": "sha512-GJtWyq9InR/2HRiLZgpIKv+ufIKrVrvjQWEj7PxAXNc5dwbNJkqhAUoAGgzRmULAnoOM5EIpveYd3J2VeSAIew=="
},
"type-fest": {
"version": "0.18.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz",
@ -6418,11 +6414,6 @@
"punycode": "^2.1.1"
}
},
"trim-newlines": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz",
"integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw=="
},
"triple-beam": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz",

View File

@ -100,8 +100,7 @@
"postcss-modules-local-by-default": "1.2.0",
"postcss-modules-scope": "1.1.0",
"postcss-modules-values": "1.3.0",
"sha1": "^1.1.1",
"@welldone-software/why-did-you-render": "^6.2.0"
"sha1": "^1.1.1"
},
"resolutions": {
"trim-newlines": "^4.0.1"

View File

@ -242,7 +242,8 @@
"app.poll.activePollInstruction": "Leave this panel open to see live responses to your poll. When you are ready, select 'Publish polling results' to publish the results and end the poll.",
"app.poll.dragDropPollInstruction": "To fill the poll values, drag a text file with the poll values onto the highlighted field",
"app.poll.customPollTextArea": "Fill poll values",
"app.poll.publishLabel": "Publish polling results",
"app.poll.publishLabel": "Publish poll",
"app.poll.cancelPollLabel": "Cancel",
"app.poll.backLabel": "Start A Poll",
"app.poll.closeLabel": "Close",
"app.poll.waitingLabel": "Waiting for responses ({0}/{1})",
@ -882,6 +883,8 @@
"app.layout.style.smart": "Smart layout",
"app.layout.style.presentationFocus": "Focus on presentation",
"app.layout.style.videoFocus": "Focus on video",
"app.layout.style.customPush": "Custom (push layout to all)",
"app.layout.style.smartPush": "Smart layout (push layout to all)",
"app.layout.style.presentationFocusPush": "Focus on presentation (push layout to all)",
"app.layout.style.videoFocusPush": "Focus on video (push layout to all)",
"playback.button.about.aria": "About",

View File

@ -1,6 +1,7 @@
const Join = require('./join');
const Create = require('./create');
const Page = require('../core/page');
const Create = require('./create');
const Join = require('./join');
const { closePages } = require('../core/util');
const { MAX_BREAKOUT_TEST_TIMEOUT } = require('../core/constants');
const { toMatchImageSnapshot } = require('jest-image-snapshot');
@ -31,7 +32,7 @@ const breakoutTest = () => {
} catch (err) {
await test.modPage1.logger(err);
} finally {
await test.close();
await closePages(test.modPage1, test.userPage1);
}
expect(response).toBe(true);
Page.checkRegression(8.0, screenshot);
@ -58,7 +59,7 @@ const breakoutTest = () => {
} catch (err) {
await test.modPage1.logger(err);
} finally {
await test.close();
await closePages(test.modPage1, test.modPage2, test.userPage1);
}
expect(response).toBe(true);
Page.checkRegression(4.0, screenshot);
@ -85,7 +86,7 @@ const breakoutTest = () => {
} catch (err) {
await test.modPage1.logger(err);
} finally {
await test.close();
await closePages(test.modPage1, test.modPage2, test.userPage1);
}
expect(response).toBe(true);
Page.checkRegression(0.6, screenshot);
@ -112,7 +113,7 @@ const breakoutTest = () => {
} catch (err) {
await test.modPage1.logger(err);
} finally {
await test.close();
await closePages(test.modPage1, test.modPage2, test.userPage1);
}
expect(response).toBe(true);
Page.checkRegression(0.7, screenshot);
@ -139,7 +140,7 @@ const breakoutTest = () => {
} catch (err) {
await test.modPage1.logger(err);
} finally {
await test.close();
await closePages(test.modPage1, test.modPage2, test.userPage1);
}
expect(response).toBe(true);
Page.checkRegression(3.6, screenshot);

View File

@ -146,25 +146,6 @@ class Create {
await this.modPage2.logger(err);
}
}
// Close pages
async close() {
try {
await this.modPage1.close();
await this.userPage1.close();
} catch (err) {
await this.modPage1.logger(err);
}
}
// Close page
async closePage(page) {
try {
await page.close();
} catch (err) {
await this.modPage1.logger(err);
}
}
}
module.exports = exports = Create;

View File

@ -75,17 +75,6 @@ class Join extends Create {
return false;
}
}
// Close pages
async close() {
try {
await this.modPage1.close();
await this.userPage1.close();
await this.modPage2.close();
} catch (err) {
await this.modPage2.logger(err);
}
}
}
module.exports = exports = Join;

View File

@ -3,8 +3,8 @@ const Send = require('./send');
const Clear = require('./clear');
const Copy = require('./copy');
const Save = require('./save');
const Poll = require('./poll');
const MultiUsers = require('../user/multiusers');
const { closePages } = require('../core/util');
const { toMatchImageSnapshot } = require('jest-image-snapshot');
const { MAX_CHAT_TEST_TIMEOUT } = require('../core/constants'); // core constants (Timeouts vars imported)
@ -124,7 +124,7 @@ const chatTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(0.9, screenshot);
@ -147,33 +147,11 @@ const chatTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(0.9, screenshot);
});
// Check for Poll Results chat message and return true when it appears
test('Poll Results chat message', async () => {
const test = new Poll();
let response;
let screenshot;
try {
const testName = 'pollResultsChatMessage';
await test.page3.logger('begin of ', testName);
await test.initUser3(testName);
await test.page3.startRecording(testName);
response = await test.test(testName);
await test.page3.startRecording();
screenshot = await test.page3.page.screenshot();
await test.page3.logger('end of ', testName);
} catch (err) {
await test.page3.logger(err);
} finally {
await test.closePage(test.page3);
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(0.9, screenshot);
});
};
module.exports = exports = chatTest;

View File

@ -1,31 +0,0 @@
const Notifications = require('../notifications/notifications');
const e = require('../core/elements');
const { checkElementLengthEqualTo } = require('../core/util');
class Poll extends Notifications {
constructor() {
super();
}
async test(testName) {
try {
// 0 messages
const chat0 = await this.page3.page.evaluate(checkElementLengthEqualTo, e.chatPollMessageText, 0);
await this.page3.screenshot(`${testName}`, `01-before-chat-message-send-[${this.page3.meetingId}]`);
await this.publishPollResults(testName);
await this.page3.waitAndClick(e.chatButton);
await this.page3.waitForSelector(e.chatPollMessageText);
// 1 message
const chat1 = await this.page3.page.evaluate(checkElementLengthEqualTo, e.chatPollMessageText, 1);
return chat0 === chat1;
} catch (err) {
await this.page3.logger(err);
return false;
}
}
}
module.exports = exports = Poll;

View File

@ -16,7 +16,7 @@ exports.settings = 'li[data-test="settings"]';
exports.settingsModal = 'div[aria-label="Settings"]';
exports.title = '._imports_ui_components_nav_bar__styles__presentationTitle';
exports.alerts = '.toastify-content';
exports.pdfFileName = '100PagesFile';
exports.pdfFileName = '100PagesFile.pdf';
// Accesskey
exports.chatButtonKey = '[accesskey="P"]';
exports.userListButton = '[accesskey="U"]';
@ -118,9 +118,7 @@ exports.userJoinPushAlerts = '[aria-label="User Join Popup Alerts"]';
exports.dropdownContent = '[data-test="dropdownContent"]';
exports.fileUploadDropZone = '[data-test="fileUploadDropZone"]';
exports.polling = 'li[data-test="polling"]';
exports.pollYesNoAbstentionBtn = 'button[aria-label="Yes / No / Abstention"]';
exports.yesBtn = 'button[aria-label="Yes"]';
exports.publishPollingResults = 'button[aria-label="Publish polling results"]';
exports.hidePollDesc = 'button[data-test="hidePollDesc"]';
exports.joinAudioToast = 'You have joined the audio conference';
exports.notificationsTab = 'span[id="notificationTab"]';
@ -131,18 +129,26 @@ exports.pollQuestionArea = 'textarea[data-test="pollQuestionArea"]';
exports.pollQuestion = 'Are we good ?';
exports.responseTypes = 'div[data-test="responseTypes"]';
exports.responseChoices = 'div[data-test="responseChoices"]';
exports.addItem = 'button[data-test="addItem"]';
exports.addPollItem = 'button[data-test="addPollItem"]';
exports.pollYesNoAbstentionBtn = 'button[aria-label="Yes / No / Abstention"]';
exports.pollLetterAlteratives = 'button[aria-label="A / B / C / D"]';
exports.userResponseBtn = 'button[aria-label="User Response"]';
exports.pollOptionItem = 'input[data-test="pollOptionItem"]';
exports.uncertain = 'Uncertain';
exports.deletePollOption = 'button[data-test="deletePollOption"]';
exports.pollAnswerOptionBtn = 'button[data-test="pollAnswerOption"]';
exports.pollAnswerOptionInput = 'input[data-test="pollAnswerOption"]';
exports.answerMessage = 'All good!';
exports.pollSubmitAnswer = 'button[data-test="submitAnswer"]';
exports.startPoll = 'button[data-test="startPoll"]';
exports.restartPoll = 'button[data-test="restartPoll"]';
exports.receivedAnswer = 'td[data-test="receivedAnswer"]';
exports.publishLabel = 'button[data-test="publishLabel"]';
exports.publishPollingLabel = 'button[data-test="publishPollingLabel"]';
exports.pollResults = 'g[data-test="pollResultAria"]';
exports.anonymousPoll = 'input[aria-label="Anonymous Poll"]';
exports.quickPoll = 'button[aria-label="Quick Poll"]';
exports.closePollingMenu = 'button[aria-label="Close Polling"]'
exports.questionSlideFileName = 'mockPollSlide.pdf';
// Presentation
exports.startScreenSharing = 'button[data-test="startScreenShare"]';
@ -166,6 +172,7 @@ exports.toastDownload = 'a[data-test="toastDownload"]';
exports.confirmManagePresentation = 'button[data-test="confirmManagePresentation"]';
exports.allowPresentationDownload = 'button[data-test="allowPresentationDownload"]';
exports.disallowPresentationDownload = 'button[data-test="disallowPresentationDownload"]';
exports.uploadPresentationFileName = 'uploadTest.png';
// User
exports.firstUser = '[data-test="userListItemCurrent"]';

View File

@ -342,6 +342,7 @@ class Page {
async type(element, text, relief = false) {
if (relief) await helper.sleep(1000);
await this.waitForSelector(element);
await this.page.focus(element);
await this.page.type(element, text);
}

View File

@ -3,6 +3,12 @@ function checkElement(element, index = 0) {
return document.querySelectorAll(element)[index] !== undefined;
}
async function closePages(...pages) {
for (const page of pages) {
await page.close();
}
}
// Text
function checkElementText(element, param, index = 0) {
return document.querySelectorAll(element)[index].innerText === param;
@ -31,6 +37,7 @@ function getElementLength(element) {
}
exports.checkElement = checkElement;
exports.closePages = closePages;
exports.checkElementText = checkElementText;
exports.checkElementTextIncludes = checkElementTextIncludes;
exports.getElementText = getElementText;

View File

@ -756,25 +756,6 @@ class CustomParameters {
return false;
}
}
async closePage(page) {
try {
await page.close();
} catch (err) {
await this.page1.logger(err);
return false;
}
}
async close(page1, page2) {
try {
await page1.close();
await page2.close();
} catch (err) {
await this.page1.logger(err);
return false;
}
}
}
module.exports = exports = CustomParameters;

View File

@ -2,6 +2,7 @@ const Page = require('../core/page');
const CustomParameters = require('./customparameters');
const c = require('./constants');
const util = require('./util');
const { closePages } = require('../core/util');
const { toMatchImageSnapshot } = require('jest-image-snapshot');
const { MAX_CUSTOM_PARAMETERS_TEST_TIMEOUT } = require('../core/constants'); // core constants (Timeouts vars imported)
@ -29,7 +30,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -52,7 +53,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -75,7 +76,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page2);
await test.page2.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -98,7 +99,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(53.18, screenshot);
@ -121,7 +122,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(53.18, screenshot);
@ -144,7 +145,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -167,7 +168,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -191,7 +192,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -215,7 +216,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -238,7 +239,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -261,7 +262,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -284,7 +285,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -308,7 +309,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -331,7 +332,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -355,7 +356,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -378,7 +379,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -401,7 +402,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -425,7 +426,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -448,7 +449,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -471,7 +472,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -495,7 +496,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -518,7 +519,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -543,7 +544,30 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
});
// 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
// publishes a poll result
test('Force Restore Presentation On New Poll Result', async () => {
const test = new CustomParameters();
let response;
let screenshot;
try {
const testName = 'forceRestorePresentationOnNewPollResult';
await test.page1.logger('begin of ', testName);
response = await test.forceRestorePresentationOnNewPollResult(testName, c.forceRestorePresentationOnNewEvents);
await test.page1.logger('end of ', testName);
await test.page2.stopRecording();
screenshot = await test.page1.page.screenshot();
} catch (err) {
await test.page1.logger(err);
} finally {
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -566,7 +590,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -589,7 +613,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -612,7 +636,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -636,7 +660,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
@ -659,7 +683,7 @@ const customParametersTest = () => {
} catch (err) {
await page.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);

View File

@ -99,7 +99,7 @@ async function poll(page1, page2) {
await page1.waitAndClick(e.startPoll);
await page2.waitForSelector(e.pollingContainer);
await page2.waitAndClick(e.yesBtn);
await page1.waitAndClick(e.publishPollingResults);
await page1.waitAndClick(e.publishPollingLabel);
return true;
} catch (err) {
console.log(err);

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 196 KiB

After

Width:  |  Height:  |  Size: 196 KiB

View File

@ -2,7 +2,9 @@ const path = require('path');
const MultiUsers = require('../user/multiusers');
const Page = require('../core/page');
const util = require('./util');
const utilScreenShare = require('../screenshare/util'); // utils imported from screenshare folder
const utilPolling = require('../polling/util');
const utilScreenShare = require('../screenshare/util');
const utilPresentation = require('../presentation/util');
const e = require('../core/elements');
const { ELEMENT_WAIT_LONGER_TIME, UPLOAD_PDF_WAIT_TIME, ELEMENT_WAIT_TIME } = require('../core/constants');
const { checkElementTextIncludes } = require('../core/util');
@ -137,30 +139,10 @@ class Notifications extends MultiUsers {
try {
await this.initUser3(true, testName);
await this.page3.startRecording(testName);
await this.page3.screenshot(`${testName}`, `01-page03-audio-modal-closed-${testName}`);
await util.uploadFileMenu(this.page3);
await this.page3.screenshot(`${testName}`, `02-page03-upload-file-menu-${testName}`);
await this.page3.waitForSelector(e.fileUpload);
const fileUpload = await this.page3.page.$(e.fileUpload);
await fileUpload.uploadFile(path.join(__dirname, `../media/${e.pdfFileName}.pdf`));
await this.page3.page.waitForFunction(checkElementTextIncludes,
{ timeout: ELEMENT_WAIT_TIME },
'body', 'To be uploaded ...'
);
await this.page3.waitAndClick(e.upload);
await this.page3.page.waitForFunction(checkElementTextIncludes,
{ timeout: ELEMENT_WAIT_TIME },
'body', 'Converting file'
);
await this.page3.screenshot(`${testName}`, `03-page03-file-uploaded-and-ready-${testName}`);
await this.page3.waitForSelector(e.smallToastMsg, UPLOAD_PDF_WAIT_TIME);
await this.page3.waitForSelector(e.whiteboard);
await this.page3.screenshot(`${testName}`, `04-page03-presentation-changed-${testName}`);
await this.page3.page.waitForFunction(checkElementTextIncludes,
{ timeout: ELEMENT_WAIT_TIME },
'body', 'Current presentation'
);
await this.page3.screenshot(`${testName}`, `05-page03-presentation-change-toast-${testName}`);
await this.page3.screenshot(testName, '01-page03-audio-modal-closed');
await utilPresentation.uploadPresentation(this.page3, e.pdfFileName, UPLOAD_PDF_WAIT_TIME);
await this.page3.screenshot(testName, '02-page03-presentation-change-toast');
return true;
} catch (err) {
await this.page3.logger(err);
@ -173,7 +155,7 @@ class Notifications extends MultiUsers {
try {
await this.page3.screenshot(`${testName}`, `01-page03-audio-modal-closed-${testName}`);
await this.page3.waitForSelector(e.whiteboard);
await util.startPoll(this.page3);
await utilPolling.startPoll(this.page3, true);
await this.page3.screenshot(`${testName}`, `02-page03-started-poll-${testName}`);
await this.page3.waitForSelector(e.smallToastMsg);
const resp = await util.getLastToastValue(this.page3);
@ -216,16 +198,6 @@ class Notifications extends MultiUsers {
return false;
}
}
async closePages() {
try {
await this.page3.close();
await this.page4.close();
} catch (err) {
await this.page3.logger(err);
return false;
}
}
}
module.exports = exports = Notifications;

View File

@ -1,5 +1,6 @@
const Notifications = require('./notifications');
const Page = require('../core/page');
const { closePages } = require('../core/util');
const { toMatchImageSnapshot } = require('jest-image-snapshot');
const { MAX_NOTIFICATIONS_TEST_TIMEOUT } = require('../core/constants'); // core constants (Timeouts vars imported)
@ -24,7 +25,7 @@ const notificationsTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
await test.page1.logger('Save Setting notification !');
}
expect(response).toBe(true);
@ -45,7 +46,7 @@ const notificationsTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
await test.page1.logger('Public Chat notification !');
}
expect(response).toBe(true);
@ -66,7 +67,7 @@ const notificationsTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
await test.page1.logger('Private Chat notification !');
}
expect(response).toBe(true);
@ -87,7 +88,7 @@ const notificationsTest = () => {
} catch (err) {
await test.page3.logger(err);
} finally {
await test.closePages();
await closePages(test.page3, test.page4)
await test.page3.logger('User join notification !');
}
expect(response).toBe(true);
@ -108,7 +109,7 @@ const notificationsTest = () => {
} catch (err) {
await test.page3.logger(err);
} finally {
await test.closePage(test.page3);
await test.page3.close();
await test.page3.logger('Presentation upload notification !');
}
expect(response).toBe(true);
@ -130,7 +131,7 @@ const notificationsTest = () => {
} catch (err) {
await test.page3.logger(err);
} finally {
await test.closePage(test.page3);
await test.page3.close();
await test.page3.logger('Poll results notification !');
}
expect(response).toContain('Poll results were published');
@ -151,7 +152,7 @@ const notificationsTest = () => {
} catch (err) {
await test.page3.logger(err);
} finally {
await test.closePage(test.page3);
await test.page3.close();
await test.page3.logger('Screenshare notification !');
}
expect(response).toBe('Screenshare has started');
@ -172,7 +173,7 @@ const notificationsTest = () => {
} catch (err) {
await test.page3.logger(err);
} finally {
await test.closePage(test.page3);
await test.page3.close();
await test.page3.logger('Audio notification !');
}
expect(response).toBe(true);

View File

@ -62,29 +62,12 @@ async function privateChatMessageToast(page2) {
return e.privateChatToast;
}
// File upload notification
async function uploadFileMenu(test) {
await test.waitAndClick(e.actions);
await test.waitAndClick(e.uploadPresentation);
}
async function startPoll(test) {
await test.waitAndClick(e.actions);
await test.waitAndClick(e.polling);
await test.waitForSelector(e.hidePollDesc);
await test.waitAndClick(e.pollYesNoAbstentionBtn);
await test.waitAndClick(e.startPoll);
await test.waitAndClick(e.publishLabel);
}
exports.privateChatMessageToast = privateChatMessageToast;
exports.publicChatMessageToast = publicChatMessageToast;
exports.enableUserJoinPopup = enableUserJoinPopup;
exports.getOtherToastValue = getOtherToastValue;
exports.getLastToastValue = getLastToastValue;
exports.enableChatPopup = enableChatPopup;
exports.uploadFileMenu = uploadFileMenu;
exports.saveSettings = saveSettings;
exports.waitForToast = waitForToast;
exports.popupMenu = popupMenu;
exports.startPoll = startPoll;

View File

@ -1,25 +1,275 @@
const Page = require('../core/page');
const e = require('../core/elements');
const util = require('../notifications/util');
const { checkElementLengthEqualTo } = require('../core/util');
const util = require('./util');
const utilPresentation = require('../presentation/util');
const { ELEMENT_WAIT_TIME } = require('../core/constants');
const { checkElement, checkElementText, checkElementLengthEqualTo, getElementLength } = require('../core/util');
class Polling extends Page {
class Polling {
constructor() {
super();
this.modPage = new Page();
this.userPage = new Page();
this.newInputText = 'new option';
}
async test(testName) {
try {
await util.startPoll(this);
await this.screenshot(`${testName}`, `01-before-chat-message-send-[${this.meetingId}]`);
async initPages(testName) {
await this.initModPage(testName);
await this.initUserPage(testName);
}
const resp = this.page.evaluate(checkElementLengthEqualTo, e.pollMenuButton, 1);
async initModPage(testName) {
await this.modPage.init(true, true, testName, 'Moderator');
}
async initUserPage(testName) {
await this.userPage.init(false, true, testName, 'Attendee', this.modPage.meetingId);
}
async createPoll(testName) {
try {
await util.startPoll(this.modPage);
await this.modPage.screenshot(testName, '01-before-chat-message-send');
const resp = this.modPage.page.evaluate(checkElementLengthEqualTo, e.pollMenuButton, 1);
return resp;
} catch (err) {
await this.logger(err);
await this.modPage.logger(err);
return false;
}
}
async pollAnonymous(testName) {
try {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.screenshot(testName, '01-before-start-anonymous-poll');
await util.startPoll(this.modPage, false, true);
await this.modPage.screenshot(testName, '02-after-start-anonymous-poll');
await this.modPage.waitForSelector(e.publishPollingLabel);
await this.userPage.waitAndClick(e.pollAnswerOptionBtn);
await this.modPage.screenshot(testName, '03-after-receive-answer');
const resp = !await this.modPage.page.evaluate(checkElement, e.receivedAnswer);
return resp === true;
} catch (err) {
await this.modPage.logger(err);
return false;
}
}
async quickPoll(testName) {
try {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.screenshot(testName, '01-after-close-audio-modal');
await this.modPage.waitAndClick(e.actions);
await this.modPage.waitAndClick(e.uploadPresentation);
await this.modPage.waitForSelector(e.fileUpload);
await utilPresentation.uploadPresentation(this.modPage, e.questionSlideFileName);
await this.modPage.waitAndClick(e.quickPoll);
await this.modPage.screenshot(testName, '02-after-start-quick-poll');
await this.modPage.waitForSelector(e.pollMenuButton);
const resp = await this.userPage.hasElement(e.pollingContainer);
await this.userPage.screenshot(testName, '03-userPage-after-poll-created');
return resp === true;
} catch (err) {
await this.modPage.logger(err);
return false;
}
}
async pollUserResponse(testName) {
try {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.screenshot(testName, '01-after-close-audio-modal');
await util.openPoll(this.modPage);
await this.modPage.type(e.pollQuestionArea, e.pollQuestion);
await this.modPage.waitAndClick(e.userResponseBtn);
await this.modPage.screenshot(testName, '02-before-start-poll');
await this.modPage.waitAndClick(e.startPoll);
await this.userPage.waitForSelector(e.pollingContainer);
await this.userPage.type(e.pollAnswerOptionInput, e.answerMessage);
await this.userPage.screenshot(testName, '03-userPage-before-submit-answer');
await this.userPage.waitAndClick(e.pollSubmitAnswer);
try {
await this.modPage.page.waitForFunction(checkElementText,
{ timeout: ELEMENT_WAIT_TIME },
e.receivedAnswer, e.answerMessage
);
await this.modPage.screenshot(testName, '04-success-to-receive-answer');
} catch (e) {
await this.modPage.screenshot(testName, '04-failed-to-receive-answer');
await this.modPage.logger(e);
return false;
}
await this.modPage.waitAndClick(e.publishPollingLabel);
await this.modPage.waitForSelector(e.restartPoll);
const isPollResultsPublished = await this.modPage.hasElement(e.pollResults);
return isPollResultsPublished === true;
} catch (err) {
await this.modPage.logger(err);
return false;
}
}
async stopPoll(testName) {
try {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.screenshot(testName, '01-after-close-audio-modal');
await util.startPoll(this.modPage);
await this.modPage.screenshot(testName, '02-after-create-poll');
await this.userPage.waitForSelector(e.pollingContainer);
await this.userPage.screenshot(testName, '03-userPage-after-receive-polling-options');
await this.modPage.waitAndClick(e.closePollingMenu);
const resp = await this.userPage.wasRemoved(e.pollingContainer);
return resp === true;
} catch (err) {
await this.modPage.logger(err);
return false;
}
}
async pollResultsOnChat(testName) {
try {
await this.modPage.screenshot(testName, '01-before-chat-message-send');
await util.startPoll(this.modPage, true);
await this.modPage.waitAndClick(e.chatButton);
// Check poll result message
const resp = await this.modPage.hasElement(e.chatPollMessageText);
return resp === true;
} catch (err) {
await this.modPage.logger(err);
return false;
}
}
async pollResultsOnWhiteboard(testName) {
try {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.screenshot(testName, '01-before-start-poll');
await util.startPoll(this.modPage, true);
// Check poll result on whiteboard
const resp = await this.modPage.hasElement(e.pollResults);
return resp === true;
} catch (err) {
await this.modPage.logger(err);
return false;
}
}
async pollResultsInDifferentPresentation(testName) {
try {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.screenshot(testName, '01-before-start-poll');
await util.startPoll(this.modPage);
await this.modPage.screenshot(testName, '02-after-start-poll');
await utilPresentation.uploadPresentation(this.modPage, e.questionSlideFileName);
await this.modPage.screenshot(testName, '03-after-upload-presentation');
await this.modPage.waitAndClick(e.publishPollingLabel);
// Check poll results
const resp = await this.modPage.hasElement(e.pollResults);
return resp === true;
} catch (err) {
await this.modPage.logger(err);
return false;
}
}
async manageResponseChoices(testName) {
try {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.screenshot(testName, '01-after-close-audio-modal');
await this.startNewPoll();
await this.modPage.screenshot(testName, '02-after-open-polling-menu');
const initialRespCount = await this.modPage.page.evaluate(getElementLength, e.pollOptionItem);
// Add
await this.modPage.waitAndClick(e.addPollItem);
await this.typeOnLastChoiceInput();
await this.modPage.screenshot(testName, '03-after-add-option');
await this.modPage.waitAndClick(e.startPoll);
await this.userPage.screenshot(testName, '03-userPage-options-after-add');
const optionWasAdded = (initialRespCount + 1 == await this.getAnswerOptionCount()) && await this.checkLastOptionText();
if (!optionWasAdded) {
await this.modPage.logger('Cannot add choice option');
return false;
}
// Delete
await this.startNewPoll();
await this.modPage.waitAndClick(e.deletePollOption);
await this.modPage.screenshot(testName, '04-after-delete-option');
await this.modPage.waitAndClick(e.startPoll);
await this.userPage.screenshot(testName, '04-userPage-options-after-delete');
const optionWasRemoved = initialRespCount - 1 == await this.getAnswerOptionCount();
if (!optionWasRemoved) {
await this.modPage.logger('Cannot delete choice option');
return false;
}
// Edit
await this.startNewPoll();
await this.typeOnLastChoiceInput();
await this.modPage.screenshot(testName, '05-after-edit-option');
await this.modPage.waitAndClick(e.startPoll);
await this.userPage.screenshot(testName, '05-userPage-options-after-edit');
const optionWasEdited = (initialRespCount == await this.getAnswerOptionCount()) && await this.checkLastOptionText();
if (!optionWasEdited) {
await this.modPage.logger('Cannot edit choice option');
return false;
}
return true;
} catch (err) {
await this.modPage.logger(err);
return false;
}
}
async startNewPoll() {
const hasPollStarted = await this.modPage.page.evaluate(checkElement, e.pollMenuButton);
if (hasPollStarted) {
await this.modPage.waitAndClick(e.closePollingMenu);
await this.userPage.waitForElementHandleToBeRemoved(e.pollingContainer);
}
await util.openPoll(this.modPage);
}
async getAnswerOptionCount() {
await this.userPage.waitForSelector(e.pollingContainer);
return this.userPage.page.evaluate(getElementLength, e.pollAnswerOptionBtn);
}
async typeOnLastChoiceInput() {
const allInputs = await this.modPage.page.$$(e.pollOptionItem);
const lastInput = allInputs[allInputs.length - 1];
await this.modPage.page.evaluate(el => el.value = '', lastInput);
await lastInput.type(this.newInputText);
}
async checkLastOptionText() {
await this.userPage.waitForSelector(e.pollingContainer);
const answerOptions = await this.userPage.page.$$(e.pollAnswerOptionBtn);
const lastOptionText = await this.userPage.page.evaluate(el => el.textContent, answerOptions[answerOptions.length - 1]);
return lastOptionText == this.newInputText;
}
}
module.exports = exports = Polling;

View File

@ -1,11 +1,8 @@
const { toMatchImageSnapshot } = require('jest-image-snapshot');
const CustomParameters = require('../customparameters/customparameters');
const Multiusers = require('../user/multiusers');
const Polling = require('./poll');
const Page = require('../core/page');
const Poll = require('../chat/poll');
const ce = require('../customparameters/constants');
const Poll = require('./poll');
const { closePages } = require('../core/util');
const { MAX_POLLING_TEST_TIMEOUT, TEST_DURATION_TIME } = require('../core/constants'); // core constants (Timeouts vars imported)
const { toMatchImageSnapshot } = require('jest-image-snapshot');
expect.extend({ toMatchImageSnapshot });
@ -16,95 +13,210 @@ const pollingTest = () => {
// Create Poll
test('Create Poll', async () => {
const test = new Polling();
const test = new Poll();
let response;
let screenshot;
try {
const testName = 'createPoll';
await test.logger('begin of ', testName);
await test.init(true, testName);
await test.startRecording(testName);
response = await test.test(testName);
await test.logger('end of ', testName);
await test.stopRecording();
screenshot = await test.page.screenshot();
await test.modPage.logger('begin of ', testName);
await test.initModPage(true, testName);
await test.modPage.startRecording(testName);
response = await test.createPoll(testName);
await test.modPage.logger('end of ', testName);
await test.modPage.stopRecording();
screenshot = await test.modPage.page.screenshot();
} catch (err) {
await test.logger(err);
await test.modPage.logger(err);
} finally {
await test.close();
await test.modPage.close();
}
expect(response).toBe(true);
Page.checkRegression(1.37, screenshot);
}, TEST_DURATION_TIME);
// Check for Poll Results chat message and return true when it appears
test('Poll Results chat message', async () => {
// Create anonymous poll and check if its possible to see the user's response
test('Create anonymous poll', async () => {
const test = new Poll();
let response;
let screenshot;
try {
const testName = 'pollResultsChatMessage';
await test.page3.logger('begin of ', testName);
await test.initUser3(true, testName);
await test.page3.startRecording(testName);
response = await test.test(testName);
await test.page3.logger('end of ', testName);
await test.page3.stopRecording();
screenshot = await test.page3.page.screenshot();
const testName = 'pollAnonymous';
await test.modPage.logger('begin of ', testName);
await test.initPages(testName);
await test.modPage.startRecording(testName);
response = await test.pollAnonymous(testName);
await test.modPage.logger('end of ', testName);
await test.modPage.stopRecording();
screenshot = await test.modPage.page.screenshot();
} catch (err) {
await test.page3.logger(err);
await test.modPage.logger(err);
} finally {
await test.closePage(test.page3);
await closePages(test.modPage, test.userPage);
}
expect(response).toBe(true);
Page.checkRegression(0.9, screenshot);
}, TEST_DURATION_TIME);
// 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
// publishes a poll result
test('Force Restore Presentation On New Poll Result', async () => {
const test = new CustomParameters();
// Create quick poll
test('Create quick poll - from the slide', async () => {
const test = new Poll();
let response;
let screenshot;
try {
const testName = 'forceRestorePresentationOnNewPollResult';
await test.page1.logger('begin of ', testName);
response = await test.forceRestorePresentationOnNewPollResult(ce.forceRestorePresentationOnNewEvents, testName);
await test.page1.logger('end of ', testName);
await test.page2.stopRecording();
screenshot = await test.page1.page.screenshot();
const testName = 'createQuickPoll';
await test.modPage.logger('begin of ', testName);
await test.initPages(testName);
await test.modPage.startRecording(testName);
response = await test.quickPoll(testName);
await test.modPage.logger('end of ', testName);
await test.modPage.stopRecording();
screenshot = await test.modPage.page.screenshot();
} catch (err) {
await test.page1.logger(err);
await test.modPage.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.modPage, test.userPage);
}
expect(response).toBe(true);
Page.checkRegression(0.9, screenshot);
}, TEST_DURATION_TIME);
test('Create poll with user response', async () => {
const test = new Poll();
let response;
let screenshot;
try {
const testName = 'pollUserResponse';
await test.modPage.logger('begin of ', testName);
await test.initPages(testName);
response = await test.pollUserResponse(testName);
await test.modPage.logger('end of ', testName);
await test.modPage.stopRecording();
await test.userPage.stopRecording();
screenshot = await test.modPage.page.screenshot();
} catch (err) {
await test.modPage.logger(err);
} finally {
await closePages(test.modPage, test.userPage);
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
}, TEST_DURATION_TIME);
// This Test chooses randomly a polling case, runs it
// and expects having it answered by the other user
test('Random Poll', async () => {
const test = new Multiusers();
// Stop a poll manually
test('Stop a poll manually', async () => {
const test = new Poll();
let response;
let screenshot;
try {
const testName = 'randomPoll';
await test.page1.logger('begin of ', testName);
await test.init(testName);
response = await test.randomPoll(testName);
await test.page1.logger('end of ', testName);
await test.page1.stopRecording();
await test.page2.stopRecording();
screenshot = await test.page1.page.screenshot();
const testName = 'stopManuallyPoll';
await test.modPage.logger('begin of ', testName);
await test.initPages(testName);
await test.modPage.startRecording(testName);
response = await test.stopPoll(testName);
await test.modPage.logger('end of ', testName);
await test.modPage.stopRecording();
screenshot = await test.modPage.page.screenshot();
} catch (err) {
await test.page1.logger(err);
await test.modPage.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.modPage, test.userPage);
}
expect(response).toBe(true);
Page.checkRegression(0.9, screenshot);
}, TEST_DURATION_TIME);
// Check for Poll Results in chat message and return true when it appears
test('Poll results in chat message', async () => {
const test = new Poll();
let response;
let screenshot;
try {
const testName = 'pollResultsInChatMessage';
await test.modPage.logger('begin of ', testName);
await test.initModPage(true, testName);
await test.modPage.startRecording(testName);
response = await test.pollResultsOnChat(testName);
await test.modPage.logger('end of ', testName);
await test.modPage.stopRecording();
screenshot = await test.modPage.page.screenshot();
} catch (err) {
await test.modPage.logger(err);
} finally {
await test.modPage.close();
}
expect(response).toBe(true);
Page.checkRegression(0.9, screenshot);
}, TEST_DURATION_TIME);
// Check for Poll Results on the whiteboard and return true when it appears
test('Poll results on whiteboard', async () => {
const test = new Poll();
let response;
let screenshot;
try {
const testName = 'pollResultsOnWhiteboard';
await test.modPage.logger('begin of ', testName);
await test.initModPage(true, testName);
await test.modPage.startRecording(testName);
response = await test.pollResultsOnWhiteboard(testName);
await test.modPage.logger('end of ', testName);
await test.modPage.stopRecording();
screenshot = await test.modPage.page.screenshot();
} catch (err) {
await test.modPage.logger(err);
} finally {
await test.modPage.close();
}
expect(response).toBe(true);
Page.checkRegression(0.9, screenshot);
}, TEST_DURATION_TIME);
// Check for Poll Results in whiteboard and return true when it appears
test('Poll results in a different presentation', async () => {
const test = new Poll();
let response;
let screenshot;
try {
const testName = 'pollResultsInDifferentPresentation';
await test.modPage.logger('begin of ', testName);
await test.initModPage(true, testName);
await test.modPage.startRecording(testName);
response = await test.pollResultsInDifferentPresentation(testName);
await test.modPage.logger('end of ', testName);
await test.modPage.stopRecording();
screenshot = await test.modPage.page.screenshot();
} catch (err) {
await test.modPage.logger(err);
} finally {
await test.modPage.close();
}
expect(response).toBe(true);
Page.checkRegression(0.9, screenshot);
}, TEST_DURATION_TIME);
// This test check all possible actions with
// response choice: add, delete and edit
test('Manage response choices', async () => {
const test = new Poll();
let response;
let screenshot;
try {
const testName = 'manageResponseChoices';
await test.modPage.logger('begin of ', testName);
await test.initPages(testName);
response = await test.manageResponseChoices(testName);
await test.modPage.logger('end of ', testName);
await test.modPage.stopRecording();
await test.userPage.stopRecording();
screenshot = await test.modPage.page.screenshot();
} catch (err) {
await test.modPage.logger(err);
} finally {
await closePages(test.modPage, test.userPage);
}
expect(response).toBe(true);
Page.checkRegression(0.5, screenshot);
}, TEST_DURATION_TIME);
};
module.exports = exports = pollingTest;

View File

@ -0,0 +1,19 @@
const e = require('../core/elements');
async function openPoll(test) {
await test.waitAndClick(e.actions);
await test.waitAndClick(e.polling);
await test.waitForSelector(e.hidePollDesc);
await test.waitAndClick(e.pollLetterAlteratives);
await test.waitForSelector(e.pollOptionItem);
}
async function startPoll(test, shouldPublishPoll = false, isAnonymous = false) {
await openPoll(test);
if (isAnonymous) test.waitAndClickElement(e.anonymousPoll);
await test.waitAndClick(e.startPoll);
if (shouldPublishPoll) await test.waitAndClick(e.publishPollingLabel);
}
exports.openPoll = openPoll;
exports.startPoll = startPoll;

View File

@ -23,11 +23,6 @@ class Presentation {
await this.userPage.init(false, true, testName, 'Attendee', this.modPage.meetingId);
}
async closePages() {
if (this.modPage.page) await this.modPage.close();
if (this.userPage.page) await this.userPage.close();
}
async skipSlide() {
try {
await this.modPage.waitForSelector(e.whiteboard, ELEMENT_WAIT_LONGER_TIME);
@ -61,38 +56,14 @@ class Presentation {
const slides0 = await this.modPage.page.evaluate(util.getSvgOuterHtml);
await this.modPage.waitAndClick(e.actions);
await this.modPage.waitAndClick(e.uploadPresentation);
await this.modPage.screenshot(`${testName}`, `01-before-presentation-upload-[${testName}]`);
await this.modPage.waitForSelector(e.fileUpload);
const fileUpload = await this.modPage.page.$(e.fileUpload);
await fileUpload.uploadFile(`${__dirname}/upload-test.png`);
await this.modPage.page.waitForFunction(checkElementTextIncludes,
{ timeout: ELEMENT_WAIT_TIME },
'body', 'To be uploaded ...'
);
await this.modPage.page.waitForSelector(e.upload);
await this.modPage.waitAndClick(e.upload);
await this.modPage.logger('\nWaiting for the new presentation to upload...');
await this.modPage.page.waitForFunction(checkElementTextIncludes,
{ timeout: ELEMENT_WAIT_TIME },
'body', 'Converting file'
);
await this.modPage.logger('\nPresentation uploaded!');
await this.modPage.page.waitForFunction(checkElementTextIncludes,
{ timeout: ELEMENT_WAIT_LONGER_TIME },
'body', 'Current presentation'
);
await this.modPage.screenshot(`${testName}`, `02-after-presentation-upload-[${testName}]`);
await util.uploadPresentation(this.modPage, e.uploadPresentationFileName);
await this.modPage.screenshot(testName, 'after-presentation-upload');
const slides1 = await this.modPage.page.evaluate(async () => await document.querySelector('svg g g g').outerHTML);
await this.modPage.logger('\nSlides before presentation upload:');
await this.modPage.logger('Slides before presentation upload');
await this.modPage.logger(slides0);
await this.modPage.logger('\nSlides after presentation upload:');
await this.modPage.logger('Slides after presentation upload');
await this.modPage.logger(slides1);
return slides0 !== slides1;

View File

@ -1,5 +1,6 @@
const Page = require('../core/page');
const Presentation = require('./presentation');
const { closePages } = require('../core/util');
const { toMatchImageSnapshot } = require('jest-image-snapshot');
const { MAX_PRESENTATION_TEST_TIMEOUT } = require('../core/constants'); // core constants (Timeouts vars imported)
@ -26,7 +27,7 @@ const presentationTest = () => {
} catch (err) {
await test.modPage.logger(err);
} finally {
await test.closePages();
await test.modPage.close();
}
expect(response).toBe(true);
Page.checkRegression(0.81, screenshot);
@ -48,7 +49,7 @@ const presentationTest = () => {
} catch (err) {
await test.modPage.logger(err);
} finally {
await test.closePages();
await test.modPage.close();
}
expect(response).toBe(true);
Page.checkRegression(24.62, screenshot);
@ -70,7 +71,7 @@ const presentationTest = () => {
} catch (e) {
await test.modPage.logger(e);
} finally {
await test.closePages();
await closePages(test.modPage, test.userPage);
}
expect(response).toBe(true);
Page.checkRegression(24.62, screenshot);
@ -92,7 +93,7 @@ const presentationTest = () => {
} catch (e) {
await test.modPage.logger(e);
} finally {
await test.closePages();
await closePages(test.modPage, test.userPage);
}
expect(response).toBe(true);
Page.checkRegression(24.62, screenshot);

View File

@ -1,4 +1,9 @@
function checkSvgIndex (element) {
const path = require('path');
const e = require('../core/elements');
const { ELEMENT_WAIT_TIME, ELEMENT_WAIT_LONGER_TIME } = require('../core/constants');
const { checkElementTextIncludes } = require('../core/util');
function checkSvgIndex(element) {
return document.querySelector('svg g g g').outerHTML.indexOf(element) !== -1;
}
@ -6,5 +11,31 @@ function getSvgOuterHtml() {
return document.querySelector('svg g g g').outerHTML;
}
async function uploadPresentation(test, fileName, uploadTimeout = ELEMENT_WAIT_LONGER_TIME) {
await test.waitAndClick(e.actions);
await test.waitAndClick(e.uploadPresentation);
await test.waitForSelector(e.fileUpload);
const fileUpload = await test.page.$(e.fileUpload);
await fileUpload.uploadFile(path.join(__dirname, `../media/${fileName}`));
await test.page.waitForFunction(checkElementTextIncludes,
{ timeout: ELEMENT_WAIT_TIME },
'body', 'To be uploaded ...'
);
await test.waitAndClick(e.upload);
await test.logger('Waiting for the new presentation to upload...');
await test.page.waitForFunction(checkElementTextIncludes,
{ timeout: ELEMENT_WAIT_TIME },
'body', 'Converting file'
);
await test.logger('Presentation uploaded!');
await test.page.waitForFunction(checkElementTextIncludes,
{ timeout: uploadTimeout },
'body', 'Current presentation'
);
}
exports.checkSvgIndex = checkSvgIndex;
exports.getSvgOuterHtml = getSvgOuterHtml;
exports.getSvgOuterHtml = getSvgOuterHtml;
exports.uploadPresentation = uploadPresentation;

View File

@ -10,15 +10,6 @@ class SharedNotes extends Create {
const response = await util.startSharedNotes(this.modPage1);
return response;
}
async close() {
try {
await this.modPage1.close();
await this.userPage1.close();
} catch (e) {
await this.modPage1.logger(e);
}
}
}
module.exports = exports = SharedNotes;

View File

@ -1,5 +1,6 @@
const Page = require('../core/page');
const SharedNotes = require('./sharednotes');
const { closePages } = require('../core/util');
const { toMatchImageSnapshot } = require('jest-image-snapshot');
const { MAX_SHARED_NOTES_TEST_TIMEOUT } = require('../core/constants'); // core constants (Timeouts vars imported)
@ -28,7 +29,7 @@ const sharedNotesTest = () => {
} catch (err) {
await test.modPage1.logger(err);
} finally {
await test.close();
await closePages(test.modPage1, test.userPage1);
}
expect(response).toBe(true);
Page.checkRegression(0.1, screenshot);

View File

@ -96,7 +96,7 @@ class Stress {
}
}
async closeUserPages() {
async closeUsersPages() {
for (const page of this.userPages) {
try {
await page.close();

View File

@ -31,7 +31,7 @@ const stressTest = () => {
await test.modPage.logger(err);
} finally {
await test.modPage.close();
await test.closeUserPages();
await test.closeUsersPages();
}
expect(response).toBe(true);
});

View File

@ -1,7 +1,7 @@
const Page = require('../core/page');
const util = require('../chat/util');
const utilUser = require('./util');
const e = require('../core/elements');
const util = require('./util');
const utilChat = require('../chat/util');
const { ELEMENT_WAIT_TIME, ELEMENT_WAIT_LONGER_TIME } = require('../core/constants');
const { getElementLength, checkElementLengthEqualTo } = require('../core/util');
@ -40,7 +40,7 @@ class MultiUsers {
async multiUsersPublicChat(testName) {
try {
const chat0 = await this.page1.page.evaluate(getElementLength, e.chatUserMessageText);
await util.sendPublicChatMessage(this.page1, this.page2, testName);
await utilChat.sendPublicChatMessage(this.page1, this.page2, testName);
const chat1 = await this.page1.page.evaluate(getElementLength, e.chatUserMessageText);
return chat0 !== chat1;
@ -52,10 +52,10 @@ class MultiUsers {
async multiUsersPrivateChat(testName) {
try {
await util.openPrivateChatMessage(this.page1, this.page2);
await utilChat.openPrivateChatMessage(this.page1, this.page2);
const chat0 = await this.page1.page.evaluate(checkElementLengthEqualTo, e.chatUserMessageText, 0);
await util.sendPrivateChatMessage(this.page1, this.page2, testName);
await utilChat.sendPrivateChatMessage(this.page1, this.page2, testName);
const receivedMessages = await this.page1.hasElement(e.chatUserMessageText, true) && await this.page2.hasElement(e.chatUserMessageText, true);
return chat0 && receivedMessages;
@ -75,89 +75,6 @@ class MultiUsers {
}
}
async randomPoll(testName) {
try {
await this.page1.startRecording(testName);
await this.page2.startRecording(testName);
await this.page1.waitAndClick(e.actions);
await this.page1.waitAndClick(e.polling);
await this.page1.waitForSelector(e.pollQuestionArea);
await this.page1.page.focus(e.pollQuestionArea);
await this.page1.page.keyboard.type(e.pollQuestion);
const chosenRandomNb = await this.page1.page.evaluate((responseTypes) => {
const responseTypesDiv = document.querySelector(responseTypes);
const buttons = responseTypesDiv.querySelectorAll('button');
const countButtons = buttons.length;
const randomNb = Math.floor(Math.random() * countButtons) + 1;
const chosenRandomNb = randomNb - 1;
responseTypesDiv.querySelectorAll('button')[chosenRandomNb].click();
return chosenRandomNb;
}, e.responseTypes);
const customs = {
0: e.uncertain,
1: 0,
2: 'ABSTENTION',
3: 'All good!',
};
switch (chosenRandomNb) {
case 0:
// Adding a poll option
await this.page1.waitForSelector(e.responseChoices);
await this.page1.waitAndClick(e.addItem);
await this.page1.waitAndClick(e.pollOptionItem);
await this.page1.tab(2);
await this.page1.page.keyboard.type(customs[0]);
break;
case 1:
// Deleting a poll option
await this.page1.waitForSelector(e.deletePollOption);
await this.page1.clickNItem(e.deletePollOption, customs[1]);
break;
case 2:
// Editing a poll option
await this.page1.waitForSelector(e.responseChoices);
await this.page1.clickNItem(e.pollOptionItem, 2);
await this.page1.hold('Control');
await this.page1.press('KeyA');
await this.page1.release('Control');
await this.page1.page.keyboard.type(customs[2]);
await this.page1.tab(1);
break;
case 3:
// Do nothing to let Users write their single response answer
await this.page1.waitForSelector(e.responseChoices);
break;
}
const condition = chosenRandomNb === 0 || chosenRandomNb === 1 || chosenRandomNb === 2;
await this.page1.waitAndClick(e.startPoll);
await this.page2.waitForSelector(e.pollingContainer);
switch (condition) {
case true:
await this.page2.clickNItem(e.pollAnswerOptionBtn, 2);
break;
case false:
await this.page2.page.focus(e.pollAnswerOptionInput);
await this.page2.page.keyboard.type(customs[3]);
await this.page2.waitAndClick(e.pollSubmitAnswer);
break;
}
const receivedAnswerFound = await this.page1.hasElement(e.receivedAnswer, true);
await this.page1.waitAndClick(e.publishLabel, ELEMENT_WAIT_TIME, true);
await this.page1.waitForSelector(e.restartPoll);
const isPollResultsPublished = await this.page1.hasElement(e.pollResults, true);
return receivedAnswerFound && isPollResultsPublished;
} catch (err) {
await this.page1.logger(err);
return false;
}
}
async askModeratorGuestPolicy(testName) {
try {
await this.initMod1(testName);
@ -291,7 +208,7 @@ class MultiUsers {
await this.page2.page.evaluate(() => window.dispatchEvent(new CustomEvent('socketstats', { detail: { rtt: 2000 } })));
await this.page2.page.setOfflineMode(true);
await this.page2.close();
await utilUser.connectionStatus(this.page1);
await util.connectionStatus(this.page1);
const connectionStatusItemEmpty = await this.page1.wasRemoved(e.connectionStatusItemEmpty);
const connectionStatusOfflineUser = await this.page1.hasElement(e.connectionStatusOfflineUser, true, ELEMENT_WAIT_LONGER_TIME);
@ -324,14 +241,14 @@ class MultiUsers {
await this.userPage.screenshot(testName, '03-userPage-after-share-webcam');
await this.userPage.waitAndClick(e.connectionStatusBtn);
try {
await this.userPage.page.waitForFunction(utilUser.checkNetworkStatus, { timeout: ELEMENT_WAIT_TIME },
await this.userPage.page.waitForFunction(util.checkNetworkStatus, { timeout: ELEMENT_WAIT_TIME },
e.connectionDataContainer, e.connectionNetwordData
);
await this.userPage.screenshot(testName, '04-connection-network-success');
return true;
} catch (err) {
} catch (e) {
await this.userPage.screenshot(testName, '04-connection-network-failed');
this.userPage.logger(err);
this.userPage.logger(e);
return false;
}
} catch (err) {
@ -344,7 +261,7 @@ class MultiUsers {
try {
await this.page1.shareWebcam(true, ELEMENT_WAIT_LONGER_TIME);
await this.page2.shareWebcam(true, ELEMENT_WAIT_LONGER_TIME);
await utilUser.connectionStatus(this.page1);
await util.connectionStatus(this.page1);
await this.page1.waitAndClickElement(e.dataSavingWebcams);
await this.page1.waitAndClickElement(e.closeConnectionStatusModal);
await this.page1.waitForSelector(e.smallToastMsg);
@ -386,26 +303,6 @@ class MultiUsers {
return false;
}
}
// Close all Pages
async close(page1, page2) {
try {
await page1.close();
await page2.close();
} catch (err) {
await this.page1.logger(err);
return false;
}
}
async closePage(page) {
try {
await page.close();
} catch (err) {
await this.page1.logger(err);
return false;
}
}
}
module.exports = exports = MultiUsers;

View File

@ -2,6 +2,7 @@ const { toMatchImageSnapshot } = require('jest-image-snapshot');
const Page = require('../core/page');
const Status = require('./status');
const MultiUsers = require('./multiusers');
const { closePages } = require('../core/util');
const { MAX_MULTIUSERS_TEST_TIMEOUT, TEST_DURATION_TIME } = require('../core/constants'); // core constants (Timeouts vars imported)
const { NETWORK_PRESETS } = require('../core/profiles');
const devices = require('../core/devices');
@ -80,7 +81,7 @@ const userTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(2.0, screenshot);
@ -127,7 +128,7 @@ const userTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(2.0, screenshot);
@ -199,7 +200,7 @@ const userTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.closePage(test.page1);
await test.page1.close();
}
expect(response).toBe(true);
Page.checkRegression(2.0, screenshot);
@ -221,7 +222,7 @@ const userTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.userPage);
await closePages(test.page1, test.userPage);
}
expect(response).toBe(true);
Page.checkRegression(2.0, screenshot);
@ -251,7 +252,7 @@ const userTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(2.0, screenshot);
@ -274,7 +275,7 @@ const userTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.userPage);
await closePages(test.page1, test.userPage);
}
expect(response).toBe(true);
Page.checkRegression(2.0, screenshot);
@ -297,7 +298,7 @@ const userTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.userPage);
await closePages(test.page1, test.userPage);
}
expect(response).toBe(true);
Page.checkRegression(2.0, screenshot);
@ -320,7 +321,7 @@ const userTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.userPage);
await closePages(test.page1, test.userPage);
}
expect(response).toBe(true);
Page.checkRegression(2.0, screenshot);
@ -347,7 +348,7 @@ const userTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(2.0, screenshot);
@ -374,7 +375,7 @@ const userTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(2.0, screenshot);
@ -401,7 +402,7 @@ const userTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(2.0, screenshot);
@ -428,7 +429,7 @@ const userTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(2.0, screenshot);

View File

@ -1,6 +1,7 @@
const Page = require('../core/page');
const Draw = require('./draw');
const Multiusers = require('../user/multiusers');
const { closePages } = require('../core/util');
const { toMatchImageSnapshot } = require('jest-image-snapshot');
const { MAX_WHITEBOARD_TEST_TIMEOUT } = require('../core/constants');
@ -55,7 +56,7 @@ const whiteboardTest = () => {
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close(test.page1, test.page2);
await closePages(test.page1, test.page2);
}
expect(response).toBe(true);
Page.checkRegression(0.9, screenshot);

View File

@ -333,9 +333,6 @@ class ApiController {
guestStatusVal
)
//Identify which of these to logs should be used. sessionToken or user-token
log.info("Session sessionToken for " + us.fullname + " [" + session[sessionToken] + "]")
log.info("Session user-token for " + us.fullname + " [" + session['user-token'] + "]")
session.setMaxInactiveInterval(SESSION_TIMEOUT);
//check if exists the param redirect
@ -359,7 +356,16 @@ class ApiController {
us.clientUrl = clientURL + "?sessionToken=" + sessionToken
session[sessionToken] = sessionToken
meetingService.addUserSession(sessionToken, us);
meetingService.addUserSession(sessionToken, us)
logSessionInfo()
//Identify which of these to logs should be used. sessionToken or user-token
log.info("Session sessionToken for " + us.fullname + " [" + session[sessionToken] + "]")
log.info("Session user-token for " + us.fullname + " [" + session['user-token'] + "]")
logSession()
log.info("Session token: ${sessionToken}")
// Process if we send the user directly to the client or
// have it wait for approval.
@ -786,6 +792,8 @@ class ApiController {
String API_CALL = 'enter'
log.debug CONTROLLER_NAME + "#${API_CALL}"
logSessionInfo()
String respMessage = "Session not found."
boolean reject = false;
@ -827,6 +835,9 @@ class ApiController {
logoutUrl = us.logoutUrl
}
logSession()
log.info("Session token: ${sessionToken}")
response.addHeader("Cache-Control", "no-cache")
withFormat {
json {
@ -1401,6 +1412,8 @@ class ApiController {
return false
}
logSession()
if (!session[token]) {
log.info("Session for token ${token} not found")
@ -1415,6 +1428,25 @@ class ApiController {
return true
}
private void logSession() {
Enumeration<String> e = session.getAttributeNames()
log.info("---------- Session attributes ----------")
while(e.hasMoreElements()) {
String attribute = (String) e.nextElement()
log.info("${attribute}: ${session[attribute]}")
}
log.info("--------------------------------------")
}
private void logSessionInfo() {
log.info("***** Session Info ****")
log.info("ID - ${session.getId()}")
log.info("Creation Time - ${session.getCreationTime()}")
log.info("Last Accessed Time - ${session.getLastAccessedTime()}")
log.info("Max Inactive Interval - ${session.getMaxInactiveInterval}")
log.info("***********************")
}
// Validate maxParticipants constraint
private Boolean hasReachedMaxParticipants(meeting, us) {
// Meeting object calls it maxUsers to build up the drama

View File

@ -52,7 +52,7 @@ if [ ! -d sofia-sip ]; then
git clone https://github.com/freeswitch/sofia-sip.git
fi
cd sofia-sip/
git pull
git checkout v1.13.6
./bootstrap.sh
./configure
@ -66,7 +66,7 @@ if [ ! -d spandsp ]; then
git clone https://github.com/freeswitch/spandsp.git
fi
cd spandsp/
git pull
git checkout 284fe91dd068d0cf391139110fdc2811043972b9
./bootstrap.sh
./configure
@ -79,6 +79,7 @@ if [ $DISTRO == "centos7" ] || [ $DISTRO == "amzn2" ]; then
git clone https://github.com/xiph/libopusenc.git
cd libopusenc/
git checkout dc6ab59ac41a96c5bf262056ea09fa5e2f776fe6
./autogen.sh
./configure
make -j $(nproc)
@ -87,9 +88,25 @@ fi
popd
# spandsp end
# libks start
if [ ! -d libks ]; then
git clone https://github.com/signalwire/libks.git
fi
cd libks/
git checkout f43b85399f8fc840561566887e768fc877ba2583
cmake .
make
make install
cd ..
# libks end
ldconfig
# we already cloned the FS repo in freeswitch.placeholder.sh
# we already cloned the FS repo in freeswitch.placeholder.sh and selected tag/branch
patch -p0 < floor.patch

View File

@ -9,7 +9,7 @@ storage:
enabled: true
wiredTiger:
engineConfig:
cacheSizeGB: 0
cacheSizeGB: 1
journalCompressor: none
directoryForIndexes: true
collectionConfig:
@ -30,3 +30,5 @@ net:
replication:
replSetName: rs0
setParameter:
diagnosticDataCollectionEnabled: false

View File

@ -40,14 +40,10 @@ else
npm install --unsafe-perm --production
fi
# clean out stuff that is not required in the final package
rm -rf node_modules/mediasoup/{rust,.github,test}
rm -rf node_modules/mediasoup/worker/{deps,src,test,include,fuzzer}
rm -rf node_modules/mediasoup/worker/out/Release/*.a
rm -rf node_modules/mediasoup/worker/out/Release/.deps
rm -rf node_modules/mediasoup/worker/out/Release/obj.target
rm -rf node_modules/mediasoup/worker/out/deps
# clean out stuff that is not required in the final package. Most of this are object files from dependant libraries
rm -rf node_modules/mediasoup/worker/out/Release/subprojects
rm -rf node_modules/mediasoup/worker/out/Release/mediasoup-worker.p
rm -rf node_modules/mediasoup/worker/out/Release/deps
popd
cp webrtc-sfu.nginx staging/etc/bigbluebutton/nginx

View File

@ -2,6 +2,6 @@ mkdir freeswitch
cd freeswitch
git init
git remote add origin https://github.com/signalwire/freeswitch.git
git fetch --depth 1 origin master
git fetch --depth 1 origin v1.10.7
git checkout FETCH_HEAD
cp -r ../bbb-voice-conference/config .