feat(tests): Make sure we add a single listener for iframeAPI events.

This commit is contained in:
damencho
2025-08-22 11:03:00 -05:00
committed by Дамян Минков
parent e7eab72c0c
commit d61deab163

View File

@@ -41,6 +41,10 @@ export default class IframeAPI extends BasePageObject {
addEventListener(eventName: string) {
return this.participant.execute(
(event, prefix) => {
// we want to add it once as we use static .test[event] to store the last event
if (window.jitsiAPI.listenerCount(event) > 0) {
return;
}
console.log(`${new Date().toISOString()} ${prefix}iframeAPI - Adding listener for event: ${event}`);
window.jitsiAPI.addListener(event, evt => {
console.log(