fix(e2e): look at the location map before clicking (#31180)
This commit is contained in:
@@ -30,33 +30,42 @@ test.describe("Location sharing", { tag: "@no-firefox" }, () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test("sends and displays pin drop location message successfully", async ({ page, user, app }) => {
|
test(
|
||||||
const roomId = await app.client.createRoom({});
|
"sends and displays pin drop location message successfully",
|
||||||
await page.goto(`/#/room/${roomId}`);
|
{ tag: "@screenshot" },
|
||||||
|
async ({ page, user, app }) => {
|
||||||
|
const roomId = await app.client.createRoom({});
|
||||||
|
await page.goto(`/#/room/${roomId}`);
|
||||||
|
|
||||||
const composerOptions = await app.openMessageComposerOptions();
|
const composerOptions = await app.openMessageComposerOptions();
|
||||||
await composerOptions.getByRole("menuitem", { name: "Location", exact: true }).click();
|
await composerOptions.getByRole("menuitem", { name: "Location", exact: true }).click();
|
||||||
|
|
||||||
await selectLocationShareTypeOption(page, "Pin").click();
|
await selectLocationShareTypeOption(page, "Pin").click();
|
||||||
|
|
||||||
await page.locator("#mx_LocationPicker_map").click();
|
await page.locator("#mx_LocationPicker_map").click();
|
||||||
|
|
||||||
await submitShareLocation(page);
|
await submitShareLocation(page);
|
||||||
|
|
||||||
await page.locator(".mx_RoomView_body .mx_EventTile .mx_MLocationBody").click({
|
await page.locator(".mx_RoomView_body .mx_EventTile .mx_MLocationBody").click({
|
||||||
position: {
|
position: {
|
||||||
x: 225,
|
x: 225,
|
||||||
y: 150,
|
y: 150,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// clicking location tile opens maximised map
|
// Wait for map to load
|
||||||
await expect(page.getByRole("dialog")).toBeVisible();
|
await expect(page.getByRole("region", { name: "Map" })).toMatchScreenshot(
|
||||||
|
"location-pin-drop-message-map.png",
|
||||||
|
);
|
||||||
|
|
||||||
await app.closeDialog();
|
// clicking location tile opens maximised map
|
||||||
|
await expect(page.getByRole("dialog")).toBeVisible();
|
||||||
|
|
||||||
await expect(page.locator(".mx_Marker")).toBeVisible();
|
await app.closeDialog();
|
||||||
});
|
|
||||||
|
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 |
Reference in New Issue
Block a user