mirror of
https://github.com/vector-im/element-web.git
synced 2025-12-03 16:31:37 +01:00
Fix location sharing dialog screenshot flake (#31288)
* FIx location screenshot flake * const * Use the map marker to click on the map.
This commit is contained in:
parent
aee24be1b4
commit
81c375007e
@ -46,24 +46,21 @@ test.describe("Location sharing", { tag: "@no-firefox" }, () => {
|
||||
|
||||
await submitShareLocation(page);
|
||||
|
||||
await page.locator(".mx_RoomView_body .mx_EventTile .mx_MLocationBody").click({
|
||||
position: {
|
||||
x: 225,
|
||||
y: 150,
|
||||
},
|
||||
});
|
||||
await page.getByRole("button", { name: "Map marker" }).click();
|
||||
|
||||
// Wait for map to load
|
||||
await expect(page.getByRole("region", { name: "Map" })).toMatchScreenshot(
|
||||
const dialog = page.getByRole("dialog");
|
||||
|
||||
// wait for the dialog to be visible
|
||||
await expect(dialog).toBeVisible();
|
||||
|
||||
// screenshot the map within the dialog
|
||||
await expect(dialog.getByRole("region", { name: "Map" })).toMatchScreenshot(
|
||||
"location-pin-drop-message-map.png",
|
||||
);
|
||||
|
||||
// clicking location tile opens maximised map
|
||||
await expect(page.getByRole("dialog")).toBeVisible();
|
||||
|
||||
await app.closeDialog();
|
||||
|
||||
await expect(page.locator(".mx_Marker")).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Map marker" })).toBeVisible();
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user