Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
JournalApp.Tests.IndexTests.HideTodaysNotes(hideNotes: False)

   System.InvalidOperationException : Missing <MudPopoverProvider />, please add it to your layout. See https://mudblazor.com/getting-started/installation#manual-install-add-components

I believe it was broken after updating to MudBlazor v7.3.0 from v7.0.0
  • Loading branch information
danielchalmers committed Jul 21, 2024
1 parent a5d5dd8 commit de4a004
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions JournalApp.Tests/IndexTests.razor
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,14 @@
var preferences = Services.GetService<PreferenceService>();
preferences.HideNotes = hideNotes;

var cut = Render(@<Index />);
var layout = Render(
@<MainLayout>
<Body>
<Index />
</Body>
</MainLayout>
);

cut.FindAll(".data-point-group").Count.Should().Be(hideNotes ? 2 : 3);
layout.FindAll(".data-point-group").Count.Should().Be(hideNotes ? 2 : 3);
}
}

0 comments on commit de4a004

Please sign in to comment.