89 lines
3.0 KiB
TypeScript
89 lines
3.0 KiB
TypeScript
import fs from 'fs';
|
|
import { merge } from 'lodash-es';
|
|
|
|
import { config } from './TestsConfig';
|
|
|
|
const defaultExpectations = {
|
|
dialIn: {
|
|
/*
|
|
* The dial-in functionality is enabled.
|
|
* true -> assert the config is enabled, the UI elements are displayed, and the feature works.
|
|
* false -> assert the config is disabled and the UI elements are not displayed.
|
|
* null -> if the config is enabled, assert the UI elements are displayed and the feature works.
|
|
*/
|
|
enabled: null,
|
|
minPinLength: 8,
|
|
/* Whether to verify that the "more numbers" page is displayed. Note that only the positive verification is
|
|
performed: when set to 'false' we do not assert that the "more numbers" page is not displayed. */
|
|
moreNumbersPage: true
|
|
},
|
|
iframe: {
|
|
// Whether the iframe integration is enabled (the inverse of `disableIframeAPI` from config.js)
|
|
enabled: true
|
|
},
|
|
jaas: {
|
|
fileSharingEnabled: true,
|
|
liveStreamingEnabled: true,
|
|
recordingEnabled: true,
|
|
transcriptionEnabled: true,
|
|
transcription: {
|
|
// Expect "async" transcription to be enabled.
|
|
asyncTranscription: true,
|
|
// Expect the JaaS transcription webhooks to fire in "async" mode.
|
|
asyncTranscriptionWebhook: true,
|
|
// Expect (deprecated) jigasi-based transcription to be enabled.
|
|
jigasiTranscription: true
|
|
},
|
|
/**
|
|
* Whether the jaas account is configured with the account-level setting to allow unauthenticated users to join.
|
|
*/
|
|
unauthenticatedJoins: false,
|
|
visitors: true
|
|
},
|
|
moderation: {
|
|
// Everyone is a moderator.
|
|
allModerators: false,
|
|
// When a moderator leaves, another one is elected.
|
|
autoModerator: true,
|
|
// The first to join is a moderator.
|
|
firstModerator: true,
|
|
// The grantOwner function is available.
|
|
grantModerator: true,
|
|
// Whether the ability to set a password is available (there's a backend options which makes moderators unable
|
|
// to set a room password unless they also happen to have a token (any valid token?))
|
|
setPasswordAvailable: true
|
|
},
|
|
connectivity: {
|
|
jvb: {
|
|
direct: true,
|
|
turn: true
|
|
},
|
|
p2p: {
|
|
direct: false,
|
|
turn: true
|
|
}
|
|
},
|
|
// We can create conferences under any tenant.
|
|
useTenant: true
|
|
};
|
|
|
|
let overrides: any = {};
|
|
|
|
if (config.expectationsFile) {
|
|
try {
|
|
const str = fs.readFileSync(config.expectationsFile, 'utf8');
|
|
|
|
// Remove comments and multiline comments.
|
|
overrides = JSON.parse(str.replace(/\/\/.*|\/\*[\s\S]*?\*\//g, ''));
|
|
} catch (e) {
|
|
console.error('Error reading expectations file', e);
|
|
}
|
|
console.log('Loaded expectations from', config.expectationsFile);
|
|
}
|
|
|
|
export const expectations = merge(defaultExpectations, overrides);
|
|
|
|
if (!process.env.WDIO_WORKER_ID) {
|
|
console.log('Expectations:', expectations);
|
|
}
|