diff --git a/src/settings/DeveloperSettingsTab.test.tsx b/src/settings/DeveloperSettingsTab.test.tsx
index d4c7b8c8f..a824022f0 100644
--- a/src/settings/DeveloperSettingsTab.test.tsx
+++ b/src/settings/DeveloperSettingsTab.test.tsx
@@ -9,6 +9,7 @@ import { afterEach, describe, expect, it, type Mock, vi } from "vitest";
import { render, waitFor, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { TooltipProvider } from "@vector-im/compound-web";
+import { BehaviorSubject } from "rxjs";
import type { MatrixClient } from "matrix-js-sdk";
import type { Room as LivekitRoom } from "livekit-client";
@@ -412,4 +413,73 @@ describe("DeveloperSettingsTab", () => {
},
);
});
+
+ describe("KeyRotationStatus", () => {
+ it("displays active status when key rotation is not suppressed", async () => {
+ const client = createMockMatrixClient();
+ const mockVm = {
+ keyRotationSuppressed$: new BehaviorSubject(false),
+ participantCount$: new BehaviorSubject(5),
+ } as unknown as any;
+
+ render(
+
+
+ ,
+ );
+
+ await waitFor(() =>
+ expect(client.doesServerSupportUnstableFeature).toHaveBeenCalled(),
+ );
+
+ expect(screen.getByText(/Media key rotation: active \(5 participants\)/)).toBeInTheDocument();
+ });
+
+ it("displays suppressed status when key rotation is suppressed", async () => {
+ const client = createMockMatrixClient();
+ const mockVm = {
+ keyRotationSuppressed$: new BehaviorSubject(true),
+ participantCount$: new BehaviorSubject(50),
+ } as unknown as any;
+
+ render(
+
+
+ ,
+ );
+
+ await waitFor(() =>
+ expect(client.doesServerSupportUnstableFeature).toHaveBeenCalled(),
+ );
+
+ expect(screen.getByText(/Media key rotation: suppressed, participant limit reached \(50 participants\)/)).toBeInTheDocument();
+ });
+
+ it("does not render KeyRotationStatus when vm is not provided", async () => {
+ const client = createMockMatrixClient();
+
+ render(
+
+
+ ,
+ );
+
+ await waitFor(() =>
+ expect(client.doesServerSupportUnstableFeature).toHaveBeenCalled(),
+ );
+
+ expect(screen.queryByText(/Media key rotation:/)).not.toBeInTheDocument();
+ });
+ });
});