Skip to content

Commit 57865d7

Browse files
committed
fix(tests): Fix hangup by avoiding not defined error.
ReferenceError: APP is not defined.
1 parent f8f331a commit 57865d7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/helpers/Participant.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,13 +729,15 @@ export class Participant {
729729
return;
730730
}
731731

732-
await this.execute(() => APP?.conference?.hangup());
732+
// @ts-ignore
733+
await this.execute(() => window.APP?.conference?.hangup());
733734

734735
// Wait until _room is unset, which is one of the last things hangup() does.
735736
await this.driver.waitUntil(
736737
async () => {
737738
try {
738-
return await this.driver.execute(() => APP?.conference?._room === undefined);
739+
// @ts-ignore
740+
return await this.driver.execute(() => window.APP?.conference?._room === undefined);
739741
} catch (e) {
740742
// There seems to be a race condition with hangup() causing the page to change, and execute()
741743
// might fail with a Bidi error. Retry.

0 commit comments

Comments
 (0)