Skip to content

Commit

Permalink
Build: fix Tests for 1.21.9 version (MudBlazor#7157)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScarletKuro authored Jul 5, 2023
1 parent a97257d commit d753343
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/MudBlazor.UnitTests/Components/AutocompleteTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public async Task AutocompleteCoercionTest()
// set a value the search won't find
autocompletecomp.SetParam(a => a.Text, "Austria"); // not part of the U.S.
// IsOpen must be true to properly simulate a user clicking outside of the component, which is what the next ToggleMenu call below does.
autocomplete.IsOpen.Should().BeTrue();
autocompletecomp.WaitForAssertion(() => autocomplete.IsOpen.Should().BeTrue());
// now trigger the coercion by closing the menu
await comp.InvokeAsync(() => autocomplete.ToggleMenu());
autocomplete.Value.Should().Be("Alabama");
Expand Down
7 changes: 3 additions & 4 deletions src/MudBlazor.UnitTests/Components/DataGridTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3654,12 +3654,11 @@ public async Task DataGridGroupExpandedServerDataTest()
comp.Instance.CollapseAllGroups();
dataGrid.Render();
// after all groups are collapsed
comp.FindAll("tbody .mud-table-row").Count.Should().Be(2);
await comp.InvokeAsync(() =>
comp.Instance.AddFruit());
comp.WaitForAssertion(() => comp.FindAll("tbody .mud-table-row").Count.Should().Be(2));
await comp.InvokeAsync(() => comp.Instance.AddFruit());
// datagrid should be expanded with the new category
dataGrid.Render();
comp.FindAll("tbody .mud-table-row").Count.Should().Be(3);
comp.WaitForAssertion(() => comp.FindAll("tbody .mud-table-row").Count.Should().Be(3));
}

[Test]
Expand Down
2 changes: 1 addition & 1 deletion src/MudBlazor.UnitTests/MudBlazor.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</Target>

<ItemGroup>
<PackageReference Include="bunit" Version="1.20.8" />
<PackageReference Include="bunit" Version="1.21.9" />
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit d753343

Please sign in to comment.