Skip to content

Commit

Permalink
Fix unit test for MudBlazor component
Browse files Browse the repository at this point in the history
Include MudPopoverProvider directly in test component
  • Loading branch information
b-straub committed Nov 4, 2024
1 parent 000465d commit 8b95425
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions RxMudBlazorLightSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
builder.RootComponents.Add<HeadOutlet>("head::after");

builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddMudServices();

builder.Services.AddMudServices(options =>
{
options.PopoverOptions.ThrowOnDuplicateProvider = false;
});
builder.Services.AddSingleton(sp => new TestService(sp));
builder.Services.AddSingleton<TimerService>();
builder.Services.AddScoped<StateService>();
Expand Down
1 change: 1 addition & 0 deletions RxMudBlazorLightTestBase/Components/TestPlayground.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@inherits RxBLServiceSubscriber<TestService>

<PageTitle>TestPlayground</PageTitle>
<MudPopoverProvider></MudPopoverProvider>

<MudStack AlignItems="AlignItems.Center">
<MudText Typo="Typo.h3" GutterBottom="true">@($"InputTest {Service.TextValue.Value} / {Service.GetRadio().Value} / {Service.RatingValue.Value}")</MudText>
Expand Down

0 comments on commit 8b95425

Please sign in to comment.