2021-04-15 00:16:41 +08:00
|
|
|
const { toMatchImageSnapshot } = require('jest-image-snapshot');
|
2021-09-28 11:21:14 +08:00
|
|
|
const Page = require('../core/page');
|
|
|
|
const Status = require('./status');
|
|
|
|
const MultiUsers = require('./multiusers');
|
2021-10-21 01:23:24 +08:00
|
|
|
const { closePages } = require('../core/util');
|
2021-09-28 11:21:14 +08:00
|
|
|
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');
|
2021-05-26 00:05:11 +08:00
|
|
|
const iPhonex = devices['iPhone X'];
|
|
|
|
const galaxyNote3 = devices['Galaxy Note 3'];
|
2020-10-09 03:25:35 +08:00
|
|
|
|
|
|
|
expect.extend({ toMatchImageSnapshot });
|
2020-08-06 02:44:17 +08:00
|
|
|
|
|
|
|
const userTest = () => {
|
|
|
|
beforeEach(() => {
|
2021-02-17 04:57:10 +08:00
|
|
|
jest.setTimeout(MAX_MULTIUSERS_TEST_TIMEOUT);
|
2020-08-06 02:44:17 +08:00
|
|
|
});
|
|
|
|
|
2021-04-05 05:53:31 +08:00
|
|
|
// Mobile User Should have 'Mobile' tag under his name in Userslist
|
|
|
|
test('Mobile Tag Name For Mobile User', async () => {
|
|
|
|
const test = new Status();
|
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'mobileTagName';
|
|
|
|
await test.logger('begin of ', testName);
|
2021-09-30 20:36:08 +08:00
|
|
|
await test.init(true, true, testName, 'Moderator', undefined, undefined, undefined, iPhonex);
|
2021-04-05 05:53:31 +08:00
|
|
|
await test.startRecording(testName);
|
|
|
|
response = await test.mobileTagName();
|
|
|
|
await test.logger('end of ', testName);
|
|
|
|
await test.stopRecording();
|
|
|
|
screenshot = await test.page.screenshot();
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.logger(err);
|
2021-04-05 05:53:31 +08:00
|
|
|
} finally {
|
|
|
|
await test.close();
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-04-05 05:53:31 +08:00
|
|
|
});
|
2021-04-02 08:54:55 +08:00
|
|
|
|
2021-04-05 05:53:31 +08:00
|
|
|
// Change user status icon and check if it has changed
|
|
|
|
test('Change status', async () => {
|
|
|
|
const test = new Status();
|
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'changeUserStatus';
|
|
|
|
await test.logger('begin of ', testName);
|
2021-09-30 20:36:08 +08:00
|
|
|
await test.init(true, true, testName);
|
2021-04-05 05:53:31 +08:00
|
|
|
await test.startRecording(testName);
|
|
|
|
response = await test.test();
|
|
|
|
await test.logger('end of ', testName);
|
|
|
|
await test.stopRecording();
|
|
|
|
screenshot = await test.page.screenshot();
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.logger(err);
|
2021-04-05 05:53:31 +08:00
|
|
|
} finally {
|
|
|
|
await test.close();
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-04-05 05:53:31 +08:00
|
|
|
});
|
2020-08-06 02:44:17 +08:00
|
|
|
|
2021-04-05 05:53:31 +08:00
|
|
|
// Connect with 2 users and check if User1 sees User2
|
|
|
|
test('Multi user presence check', async () => {
|
|
|
|
const test = new MultiUsers();
|
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'multiUsersPresenceCheck';
|
|
|
|
await test.page1.logger('begin of ', testName);
|
2021-09-30 20:36:08 +08:00
|
|
|
await test.init(testName);
|
2021-04-05 05:53:31 +08:00
|
|
|
await test.page1.startRecording(testName);
|
|
|
|
await test.page2.startRecording(testName);
|
|
|
|
response = await test.test();
|
|
|
|
await test.page1.stopRecording();
|
|
|
|
await test.page2.stopRecording();
|
|
|
|
screenshot = await test.page1.page.screenshot();
|
2021-08-14 02:03:01 +08:00
|
|
|
await test.page1.logger('end osf ', testName);
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.page1.logger(err);
|
2021-04-05 05:53:31 +08:00
|
|
|
} finally {
|
2021-10-21 01:23:24 +08:00
|
|
|
await closePages(test.page1, test.page2);
|
2021-04-05 05:53:31 +08:00
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-04-05 05:53:31 +08:00
|
|
|
});
|
2021-03-31 21:10:57 +08:00
|
|
|
|
2021-04-05 05:53:31 +08:00
|
|
|
// Open Connection Status Modal and check if appears
|
|
|
|
test('Connections Status Modal', async () => {
|
|
|
|
const test = new Status();
|
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'connectionStatusModal';
|
|
|
|
await test.logger('begin of ', testName);
|
2021-09-30 20:36:08 +08:00
|
|
|
await test.init(true, true, testName);
|
2021-04-05 05:53:31 +08:00
|
|
|
await test.startRecording(testName);
|
|
|
|
response = await test.findConnectionStatusModal();
|
|
|
|
await test.stopRecording();
|
|
|
|
screenshot = await test.page.screenshot();
|
|
|
|
await test.logger('end of ', testName);
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.logger(err);
|
2021-04-05 05:53:31 +08:00
|
|
|
} finally {
|
|
|
|
await test.close();
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-04-05 05:53:31 +08:00
|
|
|
});
|
2021-03-31 21:10:57 +08:00
|
|
|
|
2021-04-05 05:53:31 +08:00
|
|
|
// Open Connection Status Modal, start Webcam Share, disable Webcams in
|
|
|
|
// Connection Status Modal and check if webcam sharing is still available
|
|
|
|
test('Disable Webcams From Connection Status Modal', async () => {
|
2021-10-15 22:18:02 +08:00
|
|
|
const test = new MultiUsers();
|
2021-04-05 05:53:31 +08:00
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'disableWebcamsFromConnectionStatus';
|
2021-10-15 22:18:02 +08:00
|
|
|
await test.page1.logger('begin of ', testName);
|
|
|
|
await test.init(testName);
|
|
|
|
await test.page1.startRecording(testName);
|
2021-04-05 05:53:31 +08:00
|
|
|
response = await test.disableWebcamsFromConnectionStatus();
|
2021-10-15 22:18:02 +08:00
|
|
|
await test.page1.stopRecording();
|
|
|
|
screenshot = await test.page1.screenshot();
|
|
|
|
await test.page1.logger('end of ', testName);
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
2021-10-15 22:18:02 +08:00
|
|
|
await test.page1.logger(err);
|
2021-04-05 05:53:31 +08:00
|
|
|
} finally {
|
2021-10-21 01:23:24 +08:00
|
|
|
await closePages(test.page1, test.page2);
|
2021-04-05 05:53:31 +08:00
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-04-05 05:53:31 +08:00
|
|
|
});
|
2021-03-31 21:10:57 +08:00
|
|
|
|
2021-04-05 05:53:31 +08:00
|
|
|
// Open Connection Status Modal, start Screenshare, disable Screenshare in
|
|
|
|
// Connection Status Modal and check if Screensharing is still available
|
|
|
|
test('Disable Screenshare From Connection Status Modal', async () => {
|
|
|
|
const test = new Status();
|
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'disableScreenshareFromConnectionStatus';
|
|
|
|
await test.logger('begin of ', testName);
|
2021-09-30 20:36:08 +08:00
|
|
|
await test.init(true, true, testName);
|
2021-04-05 05:53:31 +08:00
|
|
|
await test.startRecording(testName);
|
|
|
|
response = await test.disableScreenshareFromConnectionStatus();
|
|
|
|
await test.stopRecording();
|
|
|
|
screenshot = await test.page.screenshot();
|
|
|
|
await test.logger('end of ', testName);
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.logger(err);
|
2021-04-05 05:53:31 +08:00
|
|
|
} finally {
|
|
|
|
await test.close();
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-04-05 05:53:31 +08:00
|
|
|
});
|
2021-04-01 22:48:18 +08:00
|
|
|
|
|
|
|
// Connect with a Good3G NETWORK_PRESET profil, Open Connection Status Modal
|
|
|
|
// and check if User1 appears in reported connection issues
|
|
|
|
test('Report a User in Connection Issues', async () => {
|
|
|
|
const test = new Status();
|
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'reportUserInConnectionIssues';
|
|
|
|
await test.logger('begin of ', testName);
|
2021-09-30 20:36:08 +08:00
|
|
|
await test.init(true, false, testName, 'Moderator', undefined, undefined, NETWORK_PRESETS.Regular4G);
|
2021-04-01 22:48:18 +08:00
|
|
|
await test.startRecording(testName);
|
|
|
|
response = await test.reportUserInConnectionIssues();
|
|
|
|
await test.stopRecording();
|
|
|
|
screenshot = await test.page.screenshot();
|
|
|
|
await test.logger('end of ', testName);
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.logger(err);
|
2021-04-01 22:48:18 +08:00
|
|
|
} finally {
|
|
|
|
await test.close();
|
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-04-01 22:48:18 +08:00
|
|
|
}, TEST_DURATION_TIME);
|
2021-04-07 08:09:43 +08:00
|
|
|
|
2021-04-07 08:39:18 +08:00
|
|
|
// Force bad connection profile, force disconnection
|
|
|
|
// and appear with offline status in Connection Status Modal
|
|
|
|
test('User Offline due to connection problem appears in Connection Status Modal', async () => {
|
|
|
|
const test = new MultiUsers();
|
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'userOfflineWithInternetProblem';
|
|
|
|
await test.page1.logger('begin of ', testName);
|
2021-09-30 20:36:08 +08:00
|
|
|
await test.init(testName);
|
2021-04-07 08:39:18 +08:00
|
|
|
await test.page1.startRecording(testName);
|
|
|
|
response = await test.userOfflineWithInternetProblem();
|
|
|
|
await test.page1.stopRecording();
|
|
|
|
screenshot = await test.page1.page.screenshot();
|
|
|
|
await test.page1.logger('end of ', testName);
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.page1.logger(err);
|
2021-04-07 08:39:18 +08:00
|
|
|
} finally {
|
2021-10-21 01:23:24 +08:00
|
|
|
await test.page1.close();
|
2021-04-07 08:39:18 +08:00
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-04-07 08:39:18 +08:00
|
|
|
}, TEST_DURATION_TIME);
|
|
|
|
|
2021-10-05 01:57:12 +08:00
|
|
|
test('Show network data in Connection Status', async () => {
|
|
|
|
const test = new MultiUsers();
|
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'connectionNetworkStatus';
|
|
|
|
await test.page1.logger('begin of ', testName);
|
|
|
|
await test.initMod1(testName);
|
|
|
|
await test.page1.startRecording(testName);
|
|
|
|
response = await test.usersConnectionStatus(testName);
|
|
|
|
await test.page1.stopRecording();
|
|
|
|
screenshot = await test.page1.page.screenshot();
|
|
|
|
await test.page1.logger('end of ', testName);
|
|
|
|
} catch (err) {
|
|
|
|
await test.page1.logger(err);
|
|
|
|
} finally {
|
2021-10-21 01:23:24 +08:00
|
|
|
await closePages(test.page1, test.userPage);
|
2021-10-05 01:57:12 +08:00
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
|
|
|
Page.checkRegression(2.0, screenshot);
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2021-04-07 08:09:43 +08:00
|
|
|
// Raise and Lower Hand and make sure that the User2 Avatar color
|
|
|
|
// and its avatar in raised hand toast are the same
|
|
|
|
test('Raise Hand Toast', async () => {
|
|
|
|
const test = new MultiUsers();
|
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'raiseAndLowerHandToast';
|
|
|
|
await test.page1.logger('begin of ', testName);
|
2021-09-30 20:36:08 +08:00
|
|
|
await test.init(testName);
|
2021-04-07 08:09:43 +08:00
|
|
|
await test.page1.startRecording(testName);
|
|
|
|
await test.page2.startRecording(testName);
|
|
|
|
const response1 = await test.raiseHandTest();
|
|
|
|
const responseColors = await test.getAvatarColorAndCompareWithUserListItem();
|
|
|
|
const response2 = await test.lowerHandTest();
|
|
|
|
response = response1 && responseColors && response2;
|
|
|
|
await test.page1.stopRecording();
|
|
|
|
await test.page2.stopRecording();
|
|
|
|
screenshot = await test.page1.page.screenshot();
|
|
|
|
await test.page1.logger('end of ', testName);
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.page1.logger(err);
|
2021-04-07 08:09:43 +08:00
|
|
|
} finally {
|
2021-10-21 01:23:24 +08:00
|
|
|
await closePages(test.page1, test.page2);
|
2021-04-07 08:09:43 +08:00
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-04-07 08:09:43 +08:00
|
|
|
});
|
2021-04-15 00:16:41 +08:00
|
|
|
|
|
|
|
// Set Guest policy to ASK_MODERATOR
|
|
|
|
// and expect user in guest wait list
|
|
|
|
test('Guest policy: ASK_MODERATOR', async () => {
|
2021-09-23 05:03:12 +08:00
|
|
|
const test = new MultiUsers();
|
2021-04-15 00:16:41 +08:00
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'askModeratorGuestPolicy';
|
|
|
|
await test.page1.logger('begin of ', testName);
|
|
|
|
await test.page1.startRecording(testName);
|
|
|
|
response = await test.askModeratorGuestPolicy(testName);
|
|
|
|
await test.page1.stopRecording();
|
|
|
|
screenshot = await test.page1.page.screenshot();
|
|
|
|
await test.page1.logger('end of ', testName);
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.page1.logger(err);
|
2021-04-15 00:16:41 +08:00
|
|
|
} finally {
|
2021-10-21 01:23:24 +08:00
|
|
|
await closePages(test.page1, test.userPage);
|
2021-04-15 00:16:41 +08:00
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-04-15 00:16:41 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// Set Guest policy to ALWAYS_ACCEPT
|
|
|
|
// and expect user to get accepted automatically
|
|
|
|
test('Guest policy: ALWAYS_ACCEPT', async () => {
|
2021-09-23 05:03:12 +08:00
|
|
|
const test = new MultiUsers();
|
2021-04-15 00:16:41 +08:00
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'alwaysAcceptGuestPolicy';
|
|
|
|
await test.page1.logger('begin of ', testName);
|
|
|
|
await test.page1.startRecording(testName);
|
|
|
|
response = await test.alwaysAcceptGuestPolicy(testName);
|
|
|
|
await test.page1.stopRecording();
|
|
|
|
screenshot = await test.page1.page.screenshot();
|
|
|
|
await test.page1.logger('end of ', testName);
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.page1.logger(err);
|
2021-04-15 00:16:41 +08:00
|
|
|
} finally {
|
2021-10-21 01:23:24 +08:00
|
|
|
await closePages(test.page1, test.userPage);
|
2021-04-15 00:16:41 +08:00
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-04-15 00:16:41 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// Set Guest policy to ALWAYS_DENY
|
|
|
|
// and expect user to get denied
|
|
|
|
test('Guest policy: ALWAYS_DENY', async () => {
|
2021-09-23 05:03:12 +08:00
|
|
|
const test = new MultiUsers();
|
2021-04-15 00:16:41 +08:00
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'alwaysDenyGuestPolicy';
|
|
|
|
await test.page1.logger('begin of ', testName);
|
|
|
|
await test.page1.startRecording(testName);
|
|
|
|
response = await test.alwaysDenyGuestPolicy(testName);
|
|
|
|
await test.page1.stopRecording();
|
|
|
|
screenshot = await test.page1.page.screenshot();
|
|
|
|
await test.page1.logger('end of ', testName);
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.page1.logger(err);
|
2021-04-15 00:16:41 +08:00
|
|
|
} finally {
|
2021-10-21 01:23:24 +08:00
|
|
|
await closePages(test.page1, test.userPage);
|
2021-04-15 00:16:41 +08:00
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-05-26 00:05:11 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// Whiteboard shouldn't be accessible when
|
|
|
|
// chat panel or userlist are active
|
|
|
|
test('Whiteboard should not be accessible when chat panel or userlist are active on mobile devices', async () => {
|
|
|
|
const test = new MultiUsers();
|
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'whiteboardNotAppearOnMobile';
|
|
|
|
await test.page1.logger('begin of ', testName);
|
2021-09-30 20:36:08 +08:00
|
|
|
await test.page1.init(true, true, testName, 'Mod1', undefined, undefined, undefined, iPhonex);
|
|
|
|
await test.page2.init(true, true, testName, 'Mod2', undefined, undefined, undefined, galaxyNote3);
|
2021-05-26 00:05:11 +08:00
|
|
|
await test.page1.startRecording(testName);
|
|
|
|
await test.page2.startRecording(testName);
|
|
|
|
response = await test.whiteboardNotAppearOnMobile(testName);
|
|
|
|
await test.page1.stopRecording();
|
|
|
|
await test.page2.stopRecording();
|
|
|
|
screenshot = await test.page1.page.screenshot();
|
|
|
|
await test.page1.logger('end of ', testName);
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.page1.logger(err);
|
2021-05-26 00:05:11 +08:00
|
|
|
} finally {
|
2021-10-21 01:23:24 +08:00
|
|
|
await closePages(test.page1, test.page2);
|
2021-04-15 00:16:41 +08:00
|
|
|
}
|
2021-05-26 00:05:11 +08:00
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-05-26 00:05:11 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// Userlist and chat panel should not appear at page
|
|
|
|
// load in iPhone and Android Mobile devices
|
|
|
|
test('Userlist does not appear at page load on iPhone and Android', async () => {
|
|
|
|
const test = new MultiUsers();
|
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'userlistNotAppearOnMobile';
|
|
|
|
await test.page1.logger('begin of ', testName);
|
2021-09-30 20:36:08 +08:00
|
|
|
await test.page1.init(true, true, testName, 'Mod1', undefined, undefined, undefined, iPhonex);
|
|
|
|
await test.page2.init(true, true, testName, 'Mod2', undefined, undefined, undefined, galaxyNote3);
|
2021-05-26 00:05:11 +08:00
|
|
|
await test.page1.startRecording(testName);
|
|
|
|
await test.page2.startRecording(testName);
|
|
|
|
response = await test.userlistNotAppearOnMobile(testName);
|
|
|
|
await test.page1.stopRecording();
|
|
|
|
await test.page2.stopRecording();
|
|
|
|
screenshot = await test.page1.page.screenshot();
|
|
|
|
await test.page1.logger('end of ', testName);
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.page1.logger(err);
|
2021-05-26 00:05:11 +08:00
|
|
|
} finally {
|
2021-10-21 01:23:24 +08:00
|
|
|
await closePages(test.page1, test.page2);
|
2021-05-26 00:05:11 +08:00
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-05-26 00:05:11 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// Userslist shouldn't appear when Chat Panel or Whiteboard
|
|
|
|
// are active on small mobile devices
|
|
|
|
test('Userslist should not appear when Chat Panel or Whiteboard are active on small mobile devices', async () => {
|
|
|
|
const test = new MultiUsers();
|
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'userlistNotAppearOnMobile';
|
|
|
|
await test.page1.logger('begin of ', testName);
|
2021-09-30 20:36:08 +08:00
|
|
|
await test.page1.init(true, true, testName, 'Mod1', undefined, undefined, undefined, iPhonex);
|
|
|
|
await test.page2.init(true, true, testName, 'Mod2', undefined, undefined, undefined, galaxyNote3);
|
2021-05-26 00:05:11 +08:00
|
|
|
await test.page1.startRecording(testName);
|
|
|
|
await test.page2.startRecording(testName);
|
|
|
|
response = await test.userlistNotAppearOnMobile();
|
|
|
|
await test.page1.stopRecording();
|
|
|
|
await test.page2.stopRecording();
|
|
|
|
screenshot = await test.page1.page.screenshot();
|
|
|
|
await test.page1.logger('end of ', testName);
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.page1.logger(err);
|
2021-05-26 00:05:11 +08:00
|
|
|
} finally {
|
2021-10-21 01:23:24 +08:00
|
|
|
await closePages(test.page1, test.page2);
|
2021-05-26 00:05:11 +08:00
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-05-26 00:05:11 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// Chat Panel shouldn't appear when Userlist or Whiteboard
|
|
|
|
// are active on small mobile devices
|
|
|
|
test('Chat Panel should not appear when Userlist or Whiteboard are active on small mobile devices', async () => {
|
|
|
|
const test = new MultiUsers();
|
|
|
|
let response;
|
|
|
|
let screenshot;
|
|
|
|
try {
|
|
|
|
const testName = 'chatPanelNotAppearOnMobile';
|
|
|
|
await test.page1.logger('begin of ', testName);
|
2021-09-30 20:36:08 +08:00
|
|
|
await test.page1.init(true, true, testName, 'Mod1', undefined, undefined, undefined, iPhonex);
|
|
|
|
await test.page2.init(true, true, testName, 'Mod2', undefined, undefined, undefined, galaxyNote3);
|
2021-05-26 00:05:11 +08:00
|
|
|
await test.page1.startRecording(testName);
|
|
|
|
await test.page2.startRecording(testName);
|
|
|
|
response = await test.chatPanelNotAppearOnMobile();
|
|
|
|
await test.page1.stopRecording();
|
|
|
|
await test.page2.stopRecording();
|
|
|
|
screenshot = await test.page1.page.screenshot();
|
|
|
|
await test.page1.logger('end of ', testName);
|
2021-08-26 22:13:18 +08:00
|
|
|
} catch (err) {
|
|
|
|
await test.page1.logger(err);
|
2021-05-26 00:05:11 +08:00
|
|
|
} finally {
|
2021-10-21 01:23:24 +08:00
|
|
|
await closePages(test.page1, test.page2);
|
2021-05-26 00:05:11 +08:00
|
|
|
}
|
|
|
|
expect(response).toBe(true);
|
2021-10-01 02:45:59 +08:00
|
|
|
Page.checkRegression(2.0, screenshot);
|
2021-04-15 00:16:41 +08:00
|
|
|
});
|
2020-08-06 02:44:17 +08:00
|
|
|
};
|
2021-08-14 02:03:01 +08:00
|
|
|
|
2023-04-04 04:23:26 +08:00
|
|
|
module.exports = exports = userTest;
|