Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Minor test fixes (#16577)
bgrozev6784921429c9
diff --git a/tests/helpers/Participant.ts b/tests/helpers/Participant.tsindex 43742f6fbd..25219417f9 100644--- a/tests/helpers/Participant.ts+++ b/tests/helpers/Participant.ts@@ -722,32 +722,32 @@ export class Participant {* Hangups the participant by leaving the page. base.html is an empty page on all deployments.*/async hangup() {- const current = await this.driver.getUrl();+ console.log('Hanging up');+ if ((await this.driver.getUrl()).endsWith('/base.html')) {+ console.log('Already hung up');- // already hangup- if (current.endsWith('/base.html')) {return;}- // do a hangup, to make sure unavailable presence is sent- await this.execute(() => typeof APP !== 'undefined' && APP.conference?.hangup());+ await this.execute(() => APP?.conference?.hangup());- // let's give it some time to leave the muc, we redirect after hangup so we should wait for the- // change of url+ // Wait until _room is unset, which is one of the last things hangup() does.await this.driver.waitUntil(async () => {- const u = await this.driver.getUrl();-- // trying to debug some failures of reporting not leaving, where we see the close page in screenshot- console.log(`initialUrl: ${current} currentUrl: ${u}`);-- return current !== u;+ try {+ return await this.driver.execute(() => APP?.conference?._room === undefined);+ } catch (e) {+ // There seems to be a race condition with hangup() causing the page to change, and execute()+ // might fail with a Bidi error. Retry.+ return false;+ }},{timeout: 8000,- timeoutMsg: `${this.name} did not leave the muc in 8s initialUrl: ${current}`+ timeoutMsg: `${this.name} failed to hang up`});+ console.log('Hung up');await this.driver.url('/base.html')diff --git a/tests/pageobjects/PasswordDialog.ts b/tests/pageobjects/PasswordDialog.tsindex 92b73b818b..540b38653c 100644--- a/tests/pageobjects/PasswordDialog.ts+++ b/tests/pageobjects/PasswordDialog.ts@@ -40,7 +40,7 @@ export default class PasswordDialog extends BaseDialog {const passwordInput = this.participant.driver.$(INPUT_KEY_XPATH);await passwordInput.waitForExist();- await passwordInput.waitForClickable();+ await passwordInput.waitForClickable({ timeout: 2000 });await passwordInput.click();await passwordInput.clearValue();