Playwright: fix (hopefully) flaky shields test
Wait for our user to fetch the bot's identity before running the test, to work around a race in the shield logic. Hopefully, fixes https://github.com/element-hq/element-web/issues/28061
This commit is contained in:
parent
33c69c32f7
commit
4607325a9b
1 changed files with 9 additions and 0 deletions
|
@ -280,6 +280,15 @@ test.describe("Cryptography", function () {
|
|||
bot: bob,
|
||||
homeserver,
|
||||
}) => {
|
||||
// Workaround for https://github.com/element-hq/element-web/issues/28640:
|
||||
// make sure that Alice has seen Bob's identity before she goes offline. We do this by opening
|
||||
// his user info.
|
||||
await app.toggleRoomInfoPanel();
|
||||
const rightPanel = page.locator(".mx_RightPanel");
|
||||
await rightPanel.getByRole("menuitem", { name: "People" }).click();
|
||||
await rightPanel.getByRole("button", { name: bob.credentials!.userId }).click();
|
||||
await expect(rightPanel.locator(".mx_UserInfo_devices")).toContainText("1 session");
|
||||
|
||||
// Our app is blocked from syncing while Bob sends his messages.
|
||||
await app.client.network.goOffline();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue