mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
fix(tests): Fix hangup by avoiding not defined error.
ReferenceError: APP is not defined.
This commit is contained in:
@@ -729,13 +729,15 @@ export class Participant {
|
||||
return;
|
||||
}
|
||||
|
||||
await this.execute(() => APP?.conference?.hangup());
|
||||
// @ts-ignore
|
||||
await this.execute(() => window.APP?.conference?.hangup());
|
||||
|
||||
// Wait until _room is unset, which is one of the last things hangup() does.
|
||||
await this.driver.waitUntil(
|
||||
async () => {
|
||||
try {
|
||||
return await this.driver.execute(() => APP?.conference?._room === undefined);
|
||||
// @ts-ignore
|
||||
return await this.driver.execute(() => window.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.
|
||||
|
||||
Reference in New Issue
Block a user