Skip to content

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

feat(tests): Adds grant moderator test.

damenchoff624a34d814
diff --git a/tests/specs/2way/grantModerator.spec.ts b/tests/specs/2way/grantModerator.spec.ts
new file mode 100644
index 0000000000..785aeb7929
--- /dev/null
+++ b/tests/specs/2way/grantModerator.spec.ts
@@ -0,0 +1,42 @@
+import { ensureOneParticipant, ensureTwoParticipants } from '../../helpers/participants';
+
+describe('Grant moderator', () => {
+ it('joining the meeting', async () => {
+ await ensureOneParticipant(ctx);
+
+ if (await ctx.p1.driver.execute(() => typeof APP.conference._room.grantOwner !== 'function')) {
+ ctx.skipSuiteTests = true;
+
+ return;
+ }
+
+ await ensureTwoParticipants(ctx);
+ });
+
+ it('grant moderator and validate', async () => {
+ const { p1, p2 } = ctx;
+
+ if (!await p1.isModerator()) {
+ ctx.skipSuiteTests = true;
+
+ return;
+ }
+
+ if (await p2.isModerator()) {
+ ctx.skipSuiteTests = true;
+
+ return;
+ }
+
+ await p1.getFilmstrip().grantModerator(p2);
+
+ await p2.driver.waitUntil(
+ () => p2.isModerator(),
+ {
+ timeout: 3000,
+ timeoutMsg: 'p2 did not become moderator'
+ }
+ );
+
+ });
+});