Wetterdienst: Hover Bugfix
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user