postit: fix rdv date picker binding

This commit is contained in:
Paul Schneider 2026-09-06 17:42:46 +01:00
commit bf569a4ac5
3 changed files with 37 additions and 1 deletions

View file

@ -135,6 +135,25 @@ public class BillingCommandPageViewModelTests
Assert.Contains("Position sélectionnée", vm.StatusMessage, StringComparison.OrdinalIgnoreCase);
}
[Fact]
public void EventDateSelection_round_trips_with_EventDate_for_DatePicker_binding()
{
var api = new RecordingApi();
var client = new BillingApiClient(api, "https://business.example/api/v1/");
var vm =
new CommandFormSummary { Id = 12, ActionName = "Rdv", Title = "Rendez-vous" }
.CreateCommandPageViewModel(
new ActivityInfo { Code = "dev", Name = "Développement" },
new ActivityUserDisplayItem { PerformerId = "perf-1", UserName = "Alice" },
client) as RdvViewModel;
var selected = new DateTimeOffset(2026, 9, 7, 14, 30, 0, TimeSpan.FromHours(2));
vm!.EventDateSelection = selected;
Assert.Equal(selected.LocalDateTime, vm.EventDate);
Assert.Equal(vm.EventDate, vm.EventDateSelection!.Value.LocalDateTime);
}
[Fact]
public void ApplyResolvedAddress_populates_empty_address_directly()
{