From d47dd66736592410e65c96024b2304784ea8f953 Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Tue, 8 Jul 2025 10:28:03 +0100 Subject: [PATCH] Add a test for the live location sharing prompt. --- playwright/e2e/location/location.spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/playwright/e2e/location/location.spec.ts b/playwright/e2e/location/location.spec.ts index 52afd5e173..000e19484d 100644 --- a/playwright/e2e/location/location.spec.ts +++ b/playwright/e2e/location/location.spec.ts @@ -57,4 +57,16 @@ test.describe("Location sharing", { tag: "@no-firefox" }, () => { await expect(page.locator(".mx_Marker")).toBeVisible(); }); + + test("is prompted for and can consent to live location sharing", { tag: "@screenshot"}, async ({ page, user, app }) => { + await app.viewRoomById(await app.client.createRoom({})); + + const composerOptions = await app.openMessageComposerOptions(); + await composerOptions.getByRole("menuitem", { name: "Location", exact: true }).click(); + const menu = page.locator(".mx_LocationShareMenu"); + + await menu.getByRole("button", { name: "My live location"}).click(); + await menu.getByLabel("Enable live location sharing").check(); + await expect(menu).toMatchScreenshot("location-live-share-dialog.png"); + }); });