diff --git a/SiemensIXBlazor.Tests/TooltipTest.cs b/SiemensIXBlazor.Tests/TooltipTest.cs new file mode 100644 index 0000000..2e49f47 --- /dev/null +++ b/SiemensIXBlazor.Tests/TooltipTest.cs @@ -0,0 +1,39 @@ +// ----------------------------------------------------------------------- +// SPDX-FileCopyrightText: 2024 Siemens AG +// +// SPDX-License-Identifier: MIT +// +// This source code is licensed under the MIT license found in the +// LICENSE file in the root directory of this source tree. +// ----------------------------------------------------------------------- + + +using Bunit; +using Microsoft.AspNetCore.Components; +using SiemensIXBlazor.Components; +using SiemensIXBlazor.Enums.Tooltip; +using Xunit; + +namespace SiemensIXBlazor.Tests +{ + public class TooltipTests : TestContextBase + { + [Fact] + public void TooltipRendersCorrectly() + { + // Arrange + var cut = RenderComponent( + ("Id", "tooltipId"), + ("TitleContent", "Test Tooltip"), + ("Interactive", true), + ("Placement", TooltipVariant.bottom), + ("For", "testElement") + ); + + // Assert + cut.MarkupMatches(""); + } + + + } +} diff --git a/SiemensIXBlazor/Components/Tooltip/Tooltip.razor b/SiemensIXBlazor/Components/Tooltip/Tooltip.razor index 2a8423e..282f44f 100644 --- a/SiemensIXBlazor/Components/Tooltip/Tooltip.razor +++ b/SiemensIXBlazor/Components/Tooltip/Tooltip.razor @@ -16,8 +16,8 @@