Add a test for the live location sharing prompt.

This commit is contained in:
Half-Shot 2025-07-08 10:28:03 +01:00
parent 01aaddf93e
commit d47dd66736

View File

@ -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");
});
});