Add snooze support for calendar reminders (toast UI, service, DB) (#825)

* Filter reminder snooze options by default reminder

* Some updates.

* Fixing empty welcome page issue and attendee loading.

* Icon system for notifications and snooze options etc.
This commit is contained in:
Burak Kaan Köse
2026-03-04 00:12:52 +01:00
committed by GitHub
parent e816e87f61
commit 5b3739c6cf
85 changed files with 486 additions and 27 deletions
@@ -0,0 +1,48 @@
using FluentAssertions;
using Wino.Core.Domain;
using Xunit;
namespace Wino.Core.Tests;
public class CalendarReminderSnoozeOptionsTests
{
[Fact]
public void GetAllowedSnoozeMinutes_WhenDefaultIs15AndReminderIs15_Excludes30()
{
var options = CalendarReminderSnoozeOptions.GetAllowedSnoozeMinutes(
reminderDurationInSeconds: 15 * 60,
defaultReminderDurationInSeconds: 15 * 60);
options.Should().Equal(5, 10, 15);
}
[Fact]
public void GetAllowedSnoozeMinutes_WhenReminderIs5AndDefaultIs15_DoesNotPassEventStart()
{
var options = CalendarReminderSnoozeOptions.GetAllowedSnoozeMinutes(
reminderDurationInSeconds: 5 * 60,
defaultReminderDurationInSeconds: 15 * 60);
options.Should().Equal(5);
}
[Fact]
public void GetAllowedSnoozeMinutes_WhenDefaultReminderIsNone_UsesReminderDurationOnly()
{
var options = CalendarReminderSnoozeOptions.GetAllowedSnoozeMinutes(
reminderDurationInSeconds: 30 * 60,
defaultReminderDurationInSeconds: 0);
options.Should().Equal(5, 10, 15, 30);
}
[Fact]
public void GetAllowedSnoozeMinutes_WhenReminderIsUnderFiveMinutes_ReturnsNoOptions()
{
var options = CalendarReminderSnoozeOptions.GetAllowedSnoozeMinutes(
reminderDurationInSeconds: 60,
defaultReminderDurationInSeconds: 15 * 60);
options.Should().BeEmpty();
}
}