test(centralui): register IKpiHistoryQueryService substitute in QueryStringDrillInTests (#207, pre-existing M6/K14 DI gap)
This commit is contained in:
@@ -13,6 +13,7 @@ using Microsoft.Extensions.Logging.Abstractions;
|
||||
using Microsoft.Extensions.Options;
|
||||
using NSubstitute;
|
||||
using ZB.MOM.WW.ScadaBridge.CentralUI.Components.Shared;
|
||||
using ZB.MOM.WW.ScadaBridge.CentralUI.Services;
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Entities.Sites;
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Repositories;
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Services;
|
||||
@@ -161,6 +162,9 @@ public sealed class QueryStringDrillInTests
|
||||
|
||||
Services.AddSingleton(Comms);
|
||||
Services.AddSingleton<IDialogService>(new AlwaysConfirmDialogService());
|
||||
// M6 (K14): the SiteCallsReport page now injects IKpiHistoryQueryService
|
||||
// for the Trends section. Provide a stand-in so these drill-in tests render.
|
||||
Services.AddSingleton(Substitute.For<IKpiHistoryQueryService>());
|
||||
|
||||
var siteRepo = Substitute.For<ISiteRepository>();
|
||||
siteRepo.GetAllSitesAsync(Arg.Any<CancellationToken>())
|
||||
|
||||
Reference in New Issue
Block a user