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 kick test.

damenchod8da6600707f
diff --git a/tests/helpers/Participant.ts b/tests/helpers/Participant.ts
index 7a21133a3f..52d17c903f 100644
--- a/tests/helpers/Participant.ts
+++ b/tests/helpers/Participant.ts
@@ -610,4 +610,11 @@ export class Participant {
expect(await displayNameEl.isDisplayed()).toBe(true);
expect(await displayNameEl.getText()).toBe(value);
}
+
+ /**
+ * Checks if the leave reason dialog is open.
+ */
+ async isLeaveReasonDialogOpen() {
+ return await this.driver.$(`div[data-testid="dialog.leaveReason"]`).isDisplayed();
+ }
}
diff --git a/tests/specs/2way/kick.spec.ts b/tests/specs/2way/kick.spec.ts
new file mode 100644
index 0000000000..b7af7d4bfc
--- /dev/null
+++ b/tests/specs/2way/kick.spec.ts
@@ -0,0 +1,38 @@
+import { ensureTwoParticipants } from '../../helpers/participants';
+
+describe('Kick - ', () => {
+ it('joining the meeting', async () => {
+ await ensureTwoParticipants(ctx);
+
+ if (!await ctx.p1.isModerator()) {
+ ctx.skipSuiteTests = true;
+ }
+ });
+
+ it('kick and check', async () => {
+ await kickParticipant2AndCheck();
+ });
+
+ it('kick p2p and check', async () => {
+ await ensureTwoParticipants(ctx, {
+ configOverwrite: {
+ p2p: {
+ enabled: true
+ }
+ }
+ });
+
+ await kickParticipant2AndCheck();
+ });
+});
+
+async function kickParticipant2AndCheck() {
+ const { p1, p2 } = ctx;
+
+ await p1.getFilmstrip().kickParticipant(await p2.getEndpointId());
+
+ await p1.waitForParticipants(0);
+
+ // check that the kicked participant sees the kick reason dialog
+ expect(await p2.isLeaveReasonDialogOpen()).toBe(true);
+}