1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

frontend: upgrade compound & simplify the confirmation modal implementation

This commit is contained in:
Quentin Gliech
2023-09-18 11:08:57 +02:00
parent 4d123b75af
commit ae484604f8
4 changed files with 52 additions and 58 deletions

View File

@@ -84,6 +84,16 @@ describe("<ConfirmationModal />", () => {
// no cancel button without onDeny
expect(screen.queryByText("Cancel")).toBeFalsy();
// The dialog does not close on escape
fireEvent.keyDown(screen.getByRole("alertdialog"), {
key: "Escape",
code: "Escape",
keyCode: 27,
});
// dialog still open
expect(screen.queryByRole("alertdialog")).toBeTruthy();
});
it("calls onConfirm on confirmation", () => {