using Bunit; using Microsoft.Extensions.DependencyInjection; using ZB.MOM.WW.ScadaBridge.CentralUI.Components.Shared; using ZB.MOM.WW.ScadaBridge.Commons.Entities.Templates; namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Shared; /// /// bUnit tests for the Create Instance template picker: templates are the only /// selectable nodes, Select stays disabled until one is picked, double-click /// selects, Cancel resolves null, and an InitialTemplateId opens the tree on /// that template. /// public class TemplatePickerDialogTests : BunitContext { private readonly DialogService _service = new(); /// Registers the dialog service and loose JS interop the picker dialog needs. public TemplatePickerDialogTests() { Services.AddSingleton(_service); JSInterop.Mode = JSRuntimeMode.Loose; } private static (List, List