Add IMAP local calendar operation tests using in-memory DB (#807)

* Add IMAP local calendar operation handler tests

* Fix tests.

* Fix calendar item show as not updating.

* Create one default calendar for local calendar accounts.
This commit is contained in:
Burak Kaan Köse
2026-02-15 18:40:32 +01:00
committed by GitHub
parent 42e51571a8
commit 2baa87daeb
7 changed files with 175 additions and 28 deletions
@@ -129,7 +129,7 @@ public partial class AccountManagementViewModel : AccountManagementPageViewModel
createdAccount.Address = accountCreationDialogResult.SpecialImapProviderDetails.Address;
createdAccount.SenderName = accountCreationDialogResult.SpecialImapProviderDetails.SenderName;
createdAccount.IsCalendarAccessGranted = customServerInformation.CalendarSupportMode == ImapCalendarSupportMode.CalDav;
createdAccount.IsCalendarAccessGranted = customServerInformation.CalendarSupportMode != ImapCalendarSupportMode.Disabled;
createdAccount.ServerInformation = customServerInformation;
await ValidateSpecialImapConnectivityAsync(customServerInformation).ConfigureAwait(false);
@@ -713,7 +713,7 @@ public partial class ImapCalDavSettingsPageViewModel : MailBaseViewModel
{
DisplayName = DisplayName.Trim(),
EmailAddress = EmailAddress.Trim(),
IsCalendarAccessGranted = serverInformation.CalendarSupportMode == ImapCalendarSupportMode.CalDav,
IsCalendarAccessGranted = serverInformation.CalendarSupportMode != ImapCalendarSupportMode.Disabled,
ServerInformation = serverInformation
});
@@ -735,7 +735,7 @@ public partial class ImapCalDavSettingsPageViewModel : MailBaseViewModel
account.SenderName = DisplayName.Trim();
account.Address = EmailAddress.Trim();
account.IsCalendarAccessGranted = serverInformation.CalendarSupportMode == ImapCalendarSupportMode.CalDav;
account.IsCalendarAccessGranted = serverInformation.CalendarSupportMode != ImapCalendarSupportMode.Disabled;
serverInformation.Id = account.ServerInformation?.Id ?? Guid.NewGuid();
serverInformation.AccountId = account.Id;