Change the title of VerificationRequestDialog when a request is cancelled (#30879)

* Test that VerificationRequestDialog updates when phase changes

* Change the title of VerificationRequestDialog when a request is cancelled

Part of implementing
https://github.com/element-hq/element-meta/issues/2898 but split out as
a separate change because it involves making VerificationRequestDialog
listen for changes to the verificationRequest so it can update based on
changes to phase.
This commit is contained in:
Andy Balaam
2025-09-26 09:59:40 +01:00
committed by GitHub
parent e225c23fba
commit 88d4f369eb
5 changed files with 197 additions and 33 deletions

View File

@@ -1106,7 +1106,7 @@ describe("<MatrixChat />", () => {
act(() => verify.click());
// And close the device verification dialog
const closeButton = await screen.findByRole("button", { name: "Close dialog" });
const closeButton = screen.getByRole("button", { name: "Close dialog" });
act(() => closeButton.click());
// Then we are not allowed in - we are still being asked to verify
@@ -1179,7 +1179,7 @@ describe("<MatrixChat />", () => {
.fn()
.mockResolvedValue({ signedByOwner: true } as DeviceVerificationStatus),
isCrossSigningReady: jest.fn().mockReturnValue(false),
requestOwnUserVerification: jest.fn().mockResolvedValue({ cancel: jest.fn() }),
requestOwnUserVerification: jest.fn().mockResolvedValue({ cancel: jest.fn(), on: jest.fn() }),
} as any;
}
});