Cover the audio menu's surfaces before joining and during a call

The lobby footer reads the same device behaviours as the in-call one, so
the menu already reaches every platform before joining, and stays gated
to desktop during a call. These are the checks that hold it there: the
view model offers the menu pre-join on desktop, Android and iOS, and the
microphone button stands alone with no chevron once a call starts on
mobile.

Spec: FEATURES_SPEC/2026-09_Audio_Quick_Menu.md, slice 5 — AC18, AC19.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
fkwp
2026-09-10 23:53:36 +02:00
co-authored by Claude Opus 5
parent 8fb367380f
commit a568275d9b
3 changed files with 77 additions and 14 deletions
@@ -0,0 +1,35 @@
/*
Copyright 2026 Element Creations Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/
import { expect, test } from "@playwright/test";
test("no audio menu during a call on mobile", async ({ page }) => {
await page.goto("/");
await page.getByTestId("home_callName").fill("Audio menu");
await page.getByTestId("home_displayName").fill("Mobile");
await page.getByTestId("home_go").click();
await expect(page.getByTestId("lobby_joinCall")).toBeVisible();
// Before joining, the microphone chevron exists and opens the full menu.
const chevron = page.getByRole("button", { name: "Microphone" });
await expect(chevron).toBeVisible();
await chevron.click();
// On mobile the menu is a drawer named after its title rather than headed
// by it.
const menu = page.getByRole("menu", { name: "Audio controls" });
await expect(menu).toBeVisible();
await expect(menu.getByRole("meter")).toBeVisible();
await expect(menu.getByRole("slider")).toBeVisible();
await page.keyboard.press("Escape");
await expect(menu).not.toBeVisible();
// During the call, the microphone button stands alone: no chevron, no menu.
await page.getByTestId("lobby_joinCall").click();
await expect(page.getByTestId("incall_mute")).toBeVisible();
await expect(page.getByTestId("incall_leave")).toBeVisible();
await expect(chevron).toHaveCount(0);
});