Ensure the incoming verification request appears above the please verify prompt (#32931)

This commit is contained in:
Andy Balaam
2026-03-30 13:32:51 +00:00
committed by GitHub
parent e0cf78b5b8
commit 36ddd5eae5
2 changed files with 19 additions and 4 deletions
@@ -270,10 +270,9 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => {
await checkDeviceIsConnectedKeyBackup(app, expectedBackupVersion, true);
}
test("Handle incoming verification request with SAS", async ({ page, credentials, homeserver, toasts }) => {
test("Handle incoming verification request with SAS", async ({ page, credentials, homeserver, toasts, app }) => {
/* Log in but don't verify the device */
await logIntoElement(page, credentials);
/* Dismiss "Verify this device" */
const authPage = page.locator(".mx_AuthPage");
await authPage.getByRole("button", { name: "Skip verification for now" }).click();
await authPage.getByRole("button", { name: "I'll verify later" }).click();
@@ -281,6 +280,17 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => {
await page.waitForSelector(".mx_MatrixChat");
const elementDeviceId = await page.evaluate(() => window.mxMatrixClientPeg.get().getDeviceId());
/* Create an encrypted room so the "Verify this device" toast appears */
await app.client.createRoom({
initial_state: [
{
type: "m.room.encryption",
state_key: "",
content: { algorithm: "m.megolm.v1.aes-sha2" },
},
],
});
/* Now initiate a verification request from the *bot* device. */
const botVerificationRequest = await aliceBotClient.evaluateHandle(
async (client, { userId, deviceId }) => {