From a64089f6a899317bb020b16d88618973bd85ffcb Mon Sep 17 00:00:00 2001 From: Loretta Date: Thu, 11 Dec 2025 23:46:36 +0100 Subject: [PATCH] Minimal SignalR test hub and endpoint for isolated testing Refactored Mango.Sandbox.EndPoints to enable minimal, dependency-light SignalR endpoint testing. Introduced DevAdminSignalRHubSandbox and TestSignalREndpoint for protocol/contract tests without full NopCommerce/FruitBank infra. Added SignalRClientSandbox and comprehensive MSTest coverage for all parameter types. Simplified Program.cs startup, updated project references, and added minimal logger. Original SignalREndpointTests replaced with focused, low-level and high-level tests. CORS and DTOs updated for compatibility. --- Nop.Plugin.Misc.AIPlugin/Infrastructure/PluginNopStartup.cs | 1 + Nop.Plugin.Misc.MangoCore/Infrastructure/PluginNopStartup.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Nop.Plugin.Misc.AIPlugin/Infrastructure/PluginNopStartup.cs b/Nop.Plugin.Misc.AIPlugin/Infrastructure/PluginNopStartup.cs index 9f836f3..e997eb6 100644 --- a/Nop.Plugin.Misc.AIPlugin/Infrastructure/PluginNopStartup.cs +++ b/Nop.Plugin.Misc.AIPlugin/Infrastructure/PluginNopStartup.cs @@ -169,6 +169,7 @@ public class PluginNopStartup : INopStartup { endpoints.MapHub(loggrHubEndPoint, options => { + options.Transports = HttpTransportType.WebSockets; options.AllowStatefulReconnects = false; }); }); diff --git a/Nop.Plugin.Misc.MangoCore/Infrastructure/PluginNopStartup.cs b/Nop.Plugin.Misc.MangoCore/Infrastructure/PluginNopStartup.cs index 25f66ba..e885e40 100644 --- a/Nop.Plugin.Misc.MangoCore/Infrastructure/PluginNopStartup.cs +++ b/Nop.Plugin.Misc.MangoCore/Infrastructure/PluginNopStartup.cs @@ -24,7 +24,7 @@ public class PluginNopStartup : INopStartup feature.AddPolicy( "AllowBlazorClient", apiPolicy => apiPolicy - .WithOrigins(["https://localhost:7144", "https://measurementtest.fruitbank.hu", "https://localhost:60589", "http://localhost:5000"]) + .WithOrigins("https://localhost:7144", "https://measurementtest.fruitbank.hu", "https://localhost:60589", "http://localhost:5000", "https://localhost:59579") .AllowAnyHeader() .AllowAnyMethod() .AllowCredentials()