Wetterdienst: Hover Bugfix

This commit is contained in:
2026-08-23 21:51:26 +02:00
parent 83a430f8ee
commit 788ae6ad32
4 changed files with 39 additions and 6 deletions
@@ -107,6 +107,20 @@ public sealed class SchoolDayWeatherSummaryTests
Assert.False(SchoolDayWeatherSummary.WarningTouchesDate(warning, Day.AddDays(3)));
}
[Fact]
public void WeekCellItem_WetterOderWarnung_AktiviertGemeinsameHoverFlaeche()
{
var cell = WeekCellItem.WeekdayHeader(DayOfWeek.Monday, Day, false);
Assert.False(cell.HasWeatherInformation);
cell.SetWeather(SchoolDayWeatherSummary.From(Snapshot(Hour(10)), Day), []);
Assert.True(cell.HasWeatherInformation);
cell.SetWeather(null, [new WeatherWarning { Headline = "Amtliche Warnung" }]);
Assert.True(cell.HasWeatherInformation);
Assert.Contains("Amtliche Warnung", cell.WeatherTooltip);
}
private static WeatherSnapshot Snapshot(params WeatherForecastHour[] hours) => new()
{
RetrievedAt = DateTime.UtcNow,