diff --git a/apps/web/playwright/e2e/crypto/decryption-failure-messages.spec.ts b/apps/web/playwright/e2e/crypto/decryption-failure-messages.spec.ts index 50e655f462f..bffa7ff539f 100644 --- a/apps/web/playwright/e2e/crypto/decryption-failure-messages.spec.ts +++ b/apps/web/playwright/e2e/crypto/decryption-failure-messages.spec.ts @@ -48,7 +48,11 @@ test.describe("Cryptography", function () { // Log in again, and see how the message looks. await logIntoElement(page, credentials); // Dismiss the "Back up your chats" toast, otherwise it gets in the way of clicking the room list - await page.getByRole("button", { name: "Dismiss" }).click(); + await page + .getByRole("alert") + .filter({ hasText: "Back up your chats" }) + .getByRole("button", { name: "Dismiss" }) + .click(); await app.viewRoomByName("Test room"); const lastTile = page.locator(".mx_EventTile").last(); await expect(lastTile).toContainText("Historical messages are not available on this device");