diff --git a/tests/helpers/expectations.ts b/tests/helpers/expectations.ts index 826a01c7eb..e50811fd4d 100644 --- a/tests/helpers/expectations.ts +++ b/tests/helpers/expectations.ts @@ -24,7 +24,8 @@ const defaultExpectations = { /** * Whether the jaas account is configured with the account-level setting to allow unauthenticated users to join. */ - unauthenticatedJoins: false + unauthenticatedJoins: false, + visitors: true }, moderation: { // Everyone is a moderator. diff --git a/tests/specs/jaas/visitors/visitorsLive.spec.ts b/tests/specs/jaas/visitors/visitorsLive.spec.ts index a867894a50..f03797ae40 100644 --- a/tests/specs/jaas/visitors/visitorsLive.spec.ts +++ b/tests/specs/jaas/visitors/visitorsLive.spec.ts @@ -2,6 +2,7 @@ import { expect } from '@wdio/globals'; import { Participant } from '../../../helpers/Participant'; import { setTestProperties } from '../../../helpers/TestProperties'; +import { expectations } from '../../../helpers/expectations'; import { joinJaasMuc, generateJaasToken as t } from '../../../helpers/jaas'; setTestProperties(__filename, { @@ -24,12 +25,13 @@ describe('Visitors live', () => { token: t({ room: ctx.roomName, displayName: 'Mo de Rator', moderator: true }) }); - // TODO: Remove this in favor of configurable test expectations - await moderator.driver.waitUntil(() => moderator.execute(() => APP.conference._room.isVisitorsSupported()), { - timeout: 2000 - }).catch(e => { - ctx.skipSuiteTests = `Because isVisitorsSupported() returned an error: ${e}.`; - }); + if (expectations.jaas.visitors) { + await moderator.driver.waitUntil(() => moderator.execute(() => APP.conference._room.isVisitorsSupported()), { + timeout: 2000 + }).catch(e => { + throw new Error(`isVisitorsSupported() returned an error: ${e}.`); + }); + } visitor = await joinJaasMuc({ name: 'p2',