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.
This commit is contained in:
Loretta 2025-12-11 23:46:36 +01:00
parent e178c18f80
commit a64089f6a8
2 changed files with 2 additions and 1 deletions

View File

@ -169,6 +169,7 @@ public class PluginNopStartup : INopStartup
{
endpoints.MapHub<LoggerSignalRHub>(loggrHubEndPoint, options =>
{
options.Transports = HttpTransportType.WebSockets;
options.AllowStatefulReconnects = false;
});
});

View File

@ -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()