Skip to content

Commit 67ca5ec

Browse files
Copilotjaviercn
andcommitted
Register CustomIntSerializer in Components.WasmMinimal for E2E test compatibility
Co-authored-by: javiercn <[email protected]>
1 parent b6723a6 commit 67ca5ec

File tree

1 file changed

+5
-0
lines changed
  • src/Components/test/testassets/Components.WasmMinimal

1 file changed

+5
-0
lines changed

src/Components/test/testassets/Components.WasmMinimal/Program.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
using System.Runtime.InteropServices.JavaScript;
55
using System.Security.Claims;
66
using Components.TestServer.Services;
7+
using Microsoft.AspNetCore.Components;
78
using Microsoft.AspNetCore.Components.Web;
89
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
10+
using TestContentPackage;
911
using TestContentPackage.Services;
1012

1113
var builder = WebAssemblyHostBuilder.CreateDefault(args);
@@ -14,6 +16,9 @@
1416
builder.Services.AddSingleton<InteractiveAutoService>();
1517
builder.Services.AddSingleton<InteractiveServerService>();
1618

19+
// Register custom serializer for persistent component state
20+
builder.Services.AddSingleton<IPersistentComponentStateSerializer<int>, CustomIntSerializer>();
21+
1722
builder.Services.AddCascadingAuthenticationState();
1823

1924
builder.Services.AddAuthenticationStateDeserialization(options =>

0 commit comments

Comments
 (0)