fix(e2e): look at the location map before clicking (#31180)

This commit is contained in:
Florian Duros
2025-11-05 16:49:41 +00:00
committed by GitHub
parent 24aa759544
commit abb93545fe
2 changed files with 28 additions and 19 deletions
+11 -2
View File
@@ -30,7 +30,10 @@ test.describe("Location sharing", { tag: "@no-firefox" }, () => {
}); });
}); });
test("sends and displays pin drop location message successfully", async ({ page, user, app }) => { test(
"sends and displays pin drop location message successfully",
{ tag: "@screenshot" },
async ({ page, user, app }) => {
const roomId = await app.client.createRoom({}); const roomId = await app.client.createRoom({});
await page.goto(`/#/room/${roomId}`); await page.goto(`/#/room/${roomId}`);
@@ -50,13 +53,19 @@ test.describe("Location sharing", { tag: "@no-firefox" }, () => {
}, },
}); });
// Wait for map to load
await expect(page.getByRole("region", { name: "Map" })).toMatchScreenshot(
"location-pin-drop-message-map.png",
);
// clicking location tile opens maximised map // clicking location tile opens maximised map
await expect(page.getByRole("dialog")).toBeVisible(); await expect(page.getByRole("dialog")).toBeVisible();
await app.closeDialog(); await app.closeDialog();
await expect(page.locator(".mx_Marker")).toBeVisible(); await expect(page.locator(".mx_Marker")).toBeVisible();
}); },
);
test( test(
"is prompted for and can consent to live location sharing", "is prompted for and can consent to live location sharing",
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB