Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(tests): load iframe external API from the room name suffix release

damencho80ad2ff33728
diff --git a/tests/helpers/Participant.ts b/tests/helpers/Participant.ts
index b699a88e21..a68d79e7a8 100644
--- a/tests/helpers/Participant.ts
+++ b/tests/helpers/Participant.ts
@@ -29,6 +29,7 @@ import VideoQualityDialog from '../pageobjects/VideoQualityDialog';
import VirtualBackgroundDialog from '../pageobjects/VirtualBackgroundDialog';
import Visitors from '../pageobjects/Visitors';
+import { config as testsConfig } from './TestsConfig';
import { LOG_PREFIX, logInfo } from './browserLogger';
import { IToken } from './token';
import { IParticipantJoinOptions, IParticipantOptions } from './types';
@@ -343,6 +344,12 @@ export class Participant {
// remove leading slash
url = `${url}&tenant="${baseUrl.pathname.substring(1)}"`;
}
+
+ // When the conferences are pinned to a release through the room name suffix, load the external API
+ // from that release as well.
+ if (testsConfig.roomName.suffix) {
+ url = `${url}&externalApiPath="${testsConfig.roomName.suffix}"`;
+ }
}
if (this._token?.jwt) {
url = `${url}&jwt="${this._token.jwt}"`;
diff --git a/tests/resources/iframeAPITest.html b/tests/resources/iframeAPITest.html
index d9fa209629..2f3e3bc4d0 100644
--- a/tests/resources/iframeAPITest.html
+++ b/tests/resources/iframeAPITest.html
@@ -121,7 +121,9 @@
};
const externalAPIScript = document.createElement('script');
- externalAPIScript.src = `https://${domain}/${tenant}external_api.js`;
+ const externalApiPath = json.externalApiPath ? `${json.externalApiPath}/` : tenant;
+
+ externalAPIScript.src = `https://${domain}/${externalApiPath}external_api.js`;
externalAPIScript.type = "text/javascript";
externalAPIScript.onload = function(){
log(`externalAPIScript.onload`);