Add DeleteAccountModal and EmailPasswordModal tests

This commit is contained in:
2025-05-31 21:59:00 +02:00
parent e642b73556
commit 8deededc05
7 changed files with 1474 additions and 13 deletions

View File

@@ -153,7 +153,7 @@ const AccountSettings: React.FC<AccountSettingsProps> = ({
}
};
const handleEmailConfirm = async (password: string): Promise<void> => {
const handleEmailConfirm = async (password: string): Promise<boolean> => {
const updates: UserProfileSettings = {
...state.localSettings,
currentPassword: password,
@@ -181,6 +181,11 @@ const AccountSettings: React.FC<AccountSettingsProps> = ({
dispatch({ type: SettingsActionType.MARK_SAVED });
setEmailModalOpened(false);
onClose();
return true;
} else {
// TODO: Handle errors appropriately
// notifications.show({...
return false;
}
};