Skip to content

Playwright test for history sharing on invite#30948

Merged
richvdh merged 5 commits intodevelopfrom
rav/share_history_on_invite_playwright
Oct 8, 2025
Merged

Playwright test for history sharing on invite#30948
richvdh merged 5 commits intodevelopfrom
rav/share_history_on_invite_playwright

Conversation

@richvdh
Copy link
Member

@richvdh richvdh commented Oct 3, 2025

@richvdh richvdh force-pushed the rav/share_history_on_invite_playwright branch from 0fecae6 to cf3c8fd Compare October 3, 2025 16:54
@richvdh richvdh added the T-Task Tasks for the team like planning label Oct 3, 2025
Helper function to fish a room ID out of the URL
Pick up the extended `Credentials` interface that was added in
element-hq/element-modules#80.
element-hq/element-modules#81 added a utility function
for building and routing `config.json`; we should use it.
Comment on lines 221 to 222
await this.page.locator(".mx_BaseCard").getByRole("menuitem", { name: "Invite" }).click();
const inviteDialog = this.page.locator(".mx_InviteDialog_other");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't use css class as playwright selector

Comment on lines 48 to 55
await bobPage.locator(".mx_RoomView").getByRole("button", { name: "Accept" }).click();

// Bob should now be able to decrypt the event
const roomViewBody = bobPage.locator(".mx_RoomView_body");
await expect(roomViewBody.getByText("A message from Alice")).toBeVisible();

const mask = [bobPage.locator(".mx_MessageTimestamp")];
await expect(bobPage.locator(".mx_RoomView_body")).toMatchScreenshot("shared-history-invite-accepted.png", {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't use css class as playwright selector

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done what I can to avoid these. It's hard to avoid for the screenshot because I want a screenshot of the whole timeline and I can't find a better selector.

@richvdh richvdh added this pull request to the merge queue Oct 8, 2025
Merged via the queue into develop with commit 4a0e8d6 Oct 8, 2025
37 checks passed
@richvdh richvdh deleted the rav/share_history_on_invite_playwright branch October 8, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

History sharing: end-to-end tests. Probably for web, via playwright?

3 participants