Skip to content

Commit

Permalink
test: add unit test for TooltipWrapperBase (#472)
Browse files Browse the repository at this point in the history
* test: add unit test for TooltipWrapperBase

* chore: bump version 7.3.0
  • Loading branch information
ArgoZhang authored Feb 3, 2023
1 parent dc3b2d2 commit c39ac2c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/BootstrapBlazor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>7.2.5</Version>
<Version>7.3.0</Version>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
Expand Down
13 changes: 13 additions & 0 deletions test/UnitTest/Components/ButtonTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,19 @@ public async Task ShowTooltip_Ok()
await cut.InvokeAsync(() => cut.Instance.ShowTooltip());
}

[Fact]
public void Trigger_Ok()
{
var cut = Context.RenderComponent<Button>();
cut.DoesNotContain("data-bs-trigger");

cut.SetParametersAndRender(pb =>
{
pb.Add(a => a.TooltipTrigger, "click");
});
cut.Contains("data-bs-trigger=\"click\"");
}

[Fact]
public async Task RemoveTooltip_Ok()
{
Expand Down

0 comments on commit c39ac2c

Please sign in to comment.