diff --git a/.github/workflows/bit.ci.BlazorUI.yml b/.github/workflows/bit.ci.BlazorUI.yml index 06901ec1de..85d5ce4dd5 100644 --- a/.github/workflows/bit.ci.BlazorUI.yml +++ b/.github/workflows/bit.ci.BlazorUI.yml @@ -50,4 +50,4 @@ jobs: run: dotnet build src/BlazorUI/Bit.BlazorUI.slnx - name: Test - run: cd src/BlazorUI/Bit.BlazorUI.Tests && dotnet test --no-build --verbosity normal + run: cd src/BlazorUI/Tests/Bit.BlazorUI.Tests && dotnet test --no-build --verbosity normal diff --git a/src/Bit.slnx b/src/Bit.slnx index edbadc6304..ded9933557 100644 --- a/src/Bit.slnx +++ b/src/Bit.slnx @@ -44,12 +44,12 @@ + - - + diff --git a/src/BlazorUI/Bit.BlazorUI.Web.slnf b/src/BlazorUI/Bit.BlazorUI.Web.slnf index 6b4261c28c..55cdd71702 100644 --- a/src/BlazorUI/Bit.BlazorUI.Web.slnf +++ b/src/BlazorUI/Bit.BlazorUI.Web.slnf @@ -2,12 +2,12 @@ "solution": { "path": "Bit.BlazorUI.slnx", "projects": [ + "Bit.BlazorUI\\Bit.BlazorUI.csproj", "Bit.BlazorUI.Assets\\Bit.BlazorUI.Assets.csproj", "Bit.BlazorUI.Extras\\Bit.BlazorUI.Extras.csproj", "Bit.BlazorUI.Icons\\Bit.BlazorUI.Icons.csproj", "Bit.BlazorUI.SourceGenerators\\Bit.BlazorUI.SourceGenerators.csproj", - "Bit.BlazorUI.Tests\\Bit.BlazorUI.Tests.csproj", - "Bit.BlazorUI\\Bit.BlazorUI.csproj", + "Tests\\Bit.BlazorUI.Tests\\Bit.BlazorUI.Tests.csproj", "Demo\\Bit.BlazorUI.Demo.Server\\Bit.BlazorUI.Demo.Server.csproj", "Demo\\Bit.BlazorUI.Demo.Shared\\Bit.BlazorUI.Demo.Shared.csproj", "Demo\\Client\\Bit.BlazorUI.Demo.Client.Core\\Bit.BlazorUI.Demo.Client.Core.csproj", diff --git a/src/BlazorUI/Bit.BlazorUI.slnx b/src/BlazorUI/Bit.BlazorUI.slnx index 683dcfb98b..ece4313cf9 100644 --- a/src/BlazorUI/Bit.BlazorUI.slnx +++ b/src/BlazorUI/Bit.BlazorUI.slnx @@ -28,10 +28,17 @@ + + + + + + + + - diff --git a/src/BlazorUI/BitActionButtonDemo.restore b/src/BlazorUI/BitActionButtonDemo.restore deleted file mode 100644 index 83c5127054..0000000000 Binary files a/src/BlazorUI/BitActionButtonDemo.restore and /dev/null differ diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj similarity index 53% rename from src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj index 44b12758e1..36569744d1 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj @@ -12,9 +12,9 @@ - - - + + + @@ -23,8 +23,8 @@ - - + + diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/BunitTestContext.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/BunitTestContext.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/BunitTestContext.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/BunitTestContext.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/ActionButton/BitActionButtonPerformanceTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/ActionButton/BitActionButtonPerformanceTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/ActionButton/BitActionButtonPerformanceTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/ActionButton/BitActionButtonPerformanceTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/ActionButton/BitActionButtonTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/ActionButton/BitActionButtonTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/ActionButton/BitActionButtonTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/ActionButton/BitActionButtonTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/BitButtonGroupTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/BitButtonGroupTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/BitButtonGroupTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/BitButtonGroupTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/BitButtonTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/BitButtonTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/BitButtonTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/BitButtonTests.cs index cf65a49552..81fa329dff 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/BitButtonTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/BitButtonTests.cs @@ -8,7 +8,7 @@ namespace Bit.BlazorUI.Tests.Components.Buttons; [TestClass] public class BitButtonTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(true, BitVariant.Fill, "title"), DataRow(true, BitVariant.Outline, "title"), DataRow(false, BitVariant.Fill, "title"), @@ -55,7 +55,7 @@ public void BitButtonTest(bool isEnabled, BitVariant variant, string title) Assert.AreEqual(isEnabled, clicked); } - [DataTestMethod, + [TestMethod, DataRow(true, BitVariant.Fill, false, false), DataRow(true, BitVariant.Outline, true, false), DataRow(false, BitVariant.Fill, false, true), @@ -82,7 +82,7 @@ public void BitButtonDisabledFocusTest(bool isEnabled, BitVariant variant, bool } } - [DataTestMethod, + [TestMethod, DataRow(true, BitVariant.Fill, "https://github.com/bitfoundation", "bit", "_blank"), DataRow(true, BitVariant.Outline, "https://github.com/bitfoundation", "bit", "_blank"), DataRow(false, BitVariant.Fill, "https://github.com/bitfoundation", "bit", "_blank"), @@ -115,7 +115,7 @@ public void BitAnchorButtonTest(bool isEnabled, BitVariant variant, string href, Assert.AreEqual(bitButton.GetAttribute("title"), title); } - [DataTestMethod, DataRow("Detailed description")] + [TestMethod, DataRow("Detailed description")] public void BitButtonAriaDescriptionTest(string ariaDescription) { var com = RenderComponent(parameters => @@ -128,7 +128,7 @@ public void BitButtonAriaDescriptionTest(string ariaDescription) Assert.IsTrue(bitButton.HasAttribute("aria-describedby")); } - [DataTestMethod, DataRow("Detailed label")] + [TestMethod, DataRow("Detailed label")] public void BitButtonAriaLabelTest(string ariaLabel) { var com = RenderComponent(parameters => @@ -141,7 +141,7 @@ public void BitButtonAriaLabelTest(string ariaLabel) Assert.IsTrue(bitButton.HasAttribute("aria-label")); } - [DataTestMethod, DataRow(true, true), DataRow(false, false), DataRow(null, false)] + [TestMethod, DataRow(true, true), DataRow(false, false), DataRow(null, false)] public void BitButtonAriaHiddenTest(bool ariaHidden, bool expectedResult) { var com = RenderComponent(parameters => @@ -154,7 +154,7 @@ public void BitButtonAriaHiddenTest(bool ariaHidden, bool expectedResult) Assert.AreEqual(expectedResult, bitButton.HasAttribute("aria-hidden")); } - [DataTestMethod, + [TestMethod, DataRow(BitButtonType.Button), DataRow(BitButtonType.Submit), DataRow(BitButtonType.Reset) @@ -206,7 +206,7 @@ public void BitButtonButtonStateNotOverriddenInEditContextTest() Assert.AreEqual("button", bitButton.GetAttribute("type")); } - [DataTestMethod, + [TestMethod, DataRow(BitColor.Info), DataRow(BitColor.Success), DataRow(BitColor.Warning), @@ -214,7 +214,6 @@ public void BitButtonButtonStateNotOverriddenInEditContextTest() DataRow(BitColor.Error), DataRow(null), ] - [TestMethod] public void BitColorOfButtonTest(BitColor? color) { var com = RenderComponent(parameters => @@ -247,13 +246,12 @@ public void BitColorOfButtonTest(BitColor? color) } } - [DataTestMethod, + [TestMethod, DataRow(BitSize.Small), DataRow(BitSize.Medium), DataRow(BitSize.Large), DataRow(null) ] - [TestMethod] public void BitSizeOfButtonTest(BitSize? size) { var com = RenderComponent(parameters => @@ -284,7 +282,7 @@ public void BitSizeOfButtonTest(BitSize? size) } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false), ] @@ -310,7 +308,7 @@ public void BitButtonLoadingContentTest(bool isLoading) } } - [DataTestMethod, + [TestMethod, DataRow(BitLabelPosition.Top), DataRow(BitLabelPosition.Top), DataRow(BitLabelPosition.Top), diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/BitMenuButtonTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/BitMenuButtonTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/BitMenuButtonTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/BitMenuButtonTests.cs index 59482034ac..f1df38fa0e 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/BitMenuButtonTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/BitMenuButtonTests.cs @@ -22,7 +22,7 @@ public class BitMenuButtonTests : BunitTestContext } }; - [DataTestMethod, + [TestMethod, DataRow(true, BitVariant.Fill), DataRow(true, BitVariant.Outline), DataRow(false, BitVariant.Fill), @@ -61,7 +61,7 @@ public void BitMenuButtonTest(bool isEnabled, BitVariant variant) } } - [DataTestMethod, + [TestMethod, DataRow("A", "Add"), DataRow("B", "Edit") ] @@ -85,7 +85,7 @@ public void BitMenuButtonShouldHaveTextAndIcon(string text, string iconName) Assert.AreEqual(text, menuButtonText.TextContent); } - [DataTestMethod, + [TestMethod, DataRow("A", "Add"), DataRow("B", "Edit") ] @@ -111,7 +111,7 @@ public void BitMenuButtonShouldHaveTextAndIconInItem(string itemText, string ite Assert.IsTrue(menuButtonItemIcon.ClassList.Contains(itemIconNameClass)); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -142,7 +142,7 @@ public void BitMenuButtonShouldBeItemClickIfEnabled(bool itemIsEnabled) } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -169,7 +169,7 @@ public void BitMenuButtonOpenMenu(bool isEnabled) } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -200,7 +200,7 @@ public void BitMenuButtonStickyTest(bool isSticky) } } - [DataTestMethod, + [TestMethod, DataRow(true) ] public void BitMenuButtonSplitTest(bool isSplit) diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/BitToggleButtonTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/BitToggleButtonTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/BitToggleButtonTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/BitToggleButtonTests.cs index 1ea3992ffc..fad941e11c 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Buttons/BitToggleButtonTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/BitToggleButtonTests.cs @@ -6,7 +6,7 @@ namespace Bit.BlazorUI.Tests.Components.Buttons; [TestClass] public class BitToggleButtonTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(true, true, "Button label", "Volume0", "title"), DataRow(true, false, "Button label", "Volume1", "title"), DataRow(false, true, "Button label", "Volume2", "title"), @@ -43,7 +43,7 @@ public void BitToggleButtonShouldHaveCorrectLabelAndIconAndTitle(bool isChecked, Assert.IsTrue(bitIconTag.ClassList.Contains($"bit-icon--{iconName}")); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false), ] @@ -63,7 +63,7 @@ public void BitToggleButtonClickEvent(bool isEnabled) Assert.AreEqual(isEnabled, clicked); } - [DataTestMethod, + [TestMethod, DataRow(true, true), DataRow(true, false), DataRow(false, true), @@ -86,7 +86,7 @@ public void BitToggleButtonShouldChangeIsCheckedParameterAfterClickWhenIsEnable( Assert.AreEqual(isEnabled ? !isChecked : isChecked, isCheckedBindingValue); } - [DataTestMethod, + [TestMethod, DataRow(true, true), DataRow(true, false), DataRow(false, true), @@ -109,7 +109,7 @@ public void BitToggleButtonShouldAddRemoveCheckedClassAfterClickWhenIsEnable(boo Assert.AreEqual(isEnabled ? !isChecked : isChecked, isCheckedBindingValue); } - [DataTestMethod, + [TestMethod, DataRow(true, false), DataRow(true, true), DataRow(false, false), @@ -134,7 +134,7 @@ public void BitToggleButtonDisabledFocusTest(bool isEnabled, bool allowDisabledF } } - [DataTestMethod, DataRow("Detailed description")] + [TestMethod, DataRow("Detailed description")] public void BitToggleButtonAriaDescriptionTest(string ariaDescription) { var component = RenderComponent(parameters => @@ -149,7 +149,7 @@ public void BitToggleButtonAriaDescriptionTest(string ariaDescription) Assert.AreEqual(bitButton.GetAttribute("aria-describedby"), ariaDescription); } - [DataTestMethod, DataRow("Detailed label")] + [TestMethod, DataRow("Detailed label")] public void BitToggleButtonAriaLabelTest(string ariaLabel) { var component = RenderComponent(parameters => @@ -164,7 +164,7 @@ public void BitToggleButtonAriaLabelTest(string ariaLabel) Assert.AreEqual(bitButton.GetAttribute("aria-label"), ariaLabel); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false), DataRow(null) @@ -181,7 +181,7 @@ public void BitToggleButtonAriaHiddenTest(bool ariaHidden) Assert.AreEqual(ariaHidden, bitButton.HasAttribute("aria-hidden")); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false), DataRow(null) diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/AppShell/BitAppShellTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/AppShell/BitAppShellTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/AppShell/BitAppShellTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/AppShell/BitAppShellTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ErrorBoundary/BitErrorBoundaryTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/ErrorBoundary/BitErrorBoundaryTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ErrorBoundary/BitErrorBoundaryTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/ErrorBoundary/BitErrorBoundaryTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ErrorBoundary/ThrowOnceComponent.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/ErrorBoundary/ThrowOnceComponent.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ErrorBoundary/ThrowOnceComponent.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/ErrorBoundary/ThrowOnceComponent.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ErrorBoundary/ThrowingComponent.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/ErrorBoundary/ThrowingComponent.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ErrorBoundary/ThrowingComponent.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/ErrorBoundary/ThrowingComponent.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/Flag/BitFlagTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/Flag/BitFlagTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/Flag/BitFlagTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/Flag/BitFlagTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/InfiniteScrolling/BitInfiniteScrollingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/InfiniteScrolling/BitInfiniteScrollingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/InfiniteScrolling/BitInfiniteScrollingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/InfiniteScrolling/BitInfiniteScrollingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/MarkdownEditor/BitMarkdownEditorTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/MarkdownEditor/BitMarkdownEditorTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/MarkdownEditor/BitMarkdownEditorTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/MarkdownEditor/BitMarkdownEditorTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/MarkdownViewer/BitMarkdownViewerTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/MarkdownViewer/BitMarkdownViewerTests.cs similarity index 99% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/MarkdownViewer/BitMarkdownViewerTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/MarkdownViewer/BitMarkdownViewerTests.cs index 502399b1cb..9ac8cf36d8 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/MarkdownViewer/BitMarkdownViewerTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/MarkdownViewer/BitMarkdownViewerTests.cs @@ -124,7 +124,7 @@ public void BitMarkdownViewerShouldReparseWhenMarkdownChanges() }); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false)] public void BitMarkdownViewerShouldRespectIsEnabled(bool isEnabled) diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/MessageBox/BitMessageBoxTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/MessageBox/BitMessageBoxTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/MessageBox/BitMessageBoxTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/MessageBox/BitMessageBoxTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ModalService/BitModalServiceTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/ModalService/BitModalServiceTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ModalService/BitModalServiceTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/ModalService/BitModalServiceTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ModalService/TestModalContent.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/ModalService/TestModalContent.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ModalService/TestModalContent.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/ModalService/TestModalContent.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/NavPanel/BitNavPanelTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/NavPanel/BitNavPanelTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/NavPanel/BitNavPanelTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/NavPanel/BitNavPanelTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/PdfReader/BitPdfReaderTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/PdfReader/BitPdfReaderTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/PdfReader/BitPdfReaderTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/PdfReader/BitPdfReaderTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ProPanel/BitProPanelTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/ProPanel/BitProPanelTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ProPanel/BitProPanelTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/ProPanel/BitProPanelTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/RichTextEditor/BitRichTextEditorTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/RichTextEditor/BitRichTextEditorTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/RichTextEditor/BitRichTextEditorTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/RichTextEditor/BitRichTextEditorTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Calendar/BitCalendarTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Calendar/BitCalendarTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Calendar/BitCalendarTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Calendar/BitCalendarTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Checkbox/BitCheckboxTestModel.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Checkbox/BitCheckboxTestModel.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Checkbox/BitCheckboxTestModel.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Checkbox/BitCheckboxTestModel.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Checkbox/BitCheckboxTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Checkbox/BitCheckboxTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Checkbox/BitCheckboxTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Checkbox/BitCheckboxTests.cs index afc1a1a69d..1572e6b85e 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Checkbox/BitCheckboxTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Checkbox/BitCheckboxTests.cs @@ -9,7 +9,7 @@ public class BitCheckboxTests : BunitTestContext private bool BitCheckBoxIsChecked; private bool BitCheckBoxIsIndeterminate = true; - [DataTestMethod, + [TestMethod, DataRow(true, true), DataRow(false, true), DataRow(true, false), @@ -47,7 +47,7 @@ public void BitCheckboxOnClickShouldWorkIfIsEnabled(bool defaultValue, bool isEn Assert.AreEqual(isEnabled, changed); } - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true), ] @@ -70,7 +70,7 @@ public void BitCheckboxReversedTest(bool reversed) } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -94,7 +94,7 @@ public void IndeterminateBitCheckboxShouldHaveCorrectClassNameIfIsEnabled(bool i } } - [DataTestMethod, + [TestMethod, DataRow("Detailed label"), DataRow(null) ] @@ -117,7 +117,7 @@ public void BitCheckboxAriaLabelTest(string ariaLabel) } } - [DataTestMethod, + [TestMethod, DataRow("Detailed description"), DataRow(null) ] @@ -140,7 +140,7 @@ public void BitCheckboxAriaDescriptionTest(string ariaDescription) } } - [DataTestMethod, + [TestMethod, DataRow("Detailed label"), DataRow(null) ] @@ -163,7 +163,7 @@ public void BitCheckboxAriaLabelledbyTest(string ariaLabelledby) } } - [DataTestMethod, + [TestMethod, DataRow("Title"), DataRow(null) ] @@ -186,7 +186,7 @@ public void BitCheckboxTitleTest(string title) } } - [DataTestMethod, + [TestMethod, DataRow("Name"), DataRow(null) ] @@ -209,7 +209,7 @@ public void BitCheckboxNameTest(string name) } } - [DataTestMethod, + [TestMethod, DataRow(3), DataRow(null) ] @@ -232,7 +232,7 @@ public void BitCheckboxAriaPosInSetTest(int? ariaPosInSet) } } - [DataTestMethod, + [TestMethod, DataRow(3), DataRow(null) ] @@ -255,7 +255,7 @@ public void BitCheckboxAriaSetSizeTest(int? ariaSetSize) } } - [DataTestMethod, + [TestMethod, DataRow("Emoji2"), DataRow("MicrosoftFlowLogo"), ] @@ -271,7 +271,7 @@ public void BitCheckboxCustomCheckmarkIconTest(string checkmarkIconName) Assert.IsTrue(icon.ClassList.Contains($"bit-icon--{checkmarkIconName}")); } - [DataTestMethod, + [TestMethod, DataRow("Icon aria-label"), DataRow(null) ] @@ -294,7 +294,7 @@ public void BitCheckboxCheckmarkIconAriaLabelTest(string ariaLabel) } } - [DataTestMethod, + [TestMethod, DataRow("Child with label tag "), DataRow("BitCheckBox (controlled)") ] @@ -309,7 +309,7 @@ public void BitCheckboxCustomChildContentTest(string childContent) chbChildContent.MarkupMatches(childContent); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -331,7 +331,7 @@ public void BitCheckBoxIsCheckedTwoWayBoundWithCustomHandlerTest(bool value) Assert.AreEqual(expectedValue, BitCheckBoxIsChecked); } - [DataTestMethod] + [TestMethod] public void BitCheckBoxIsIndeterminateTwoWayBoundWithCustomHandlerTest() { var component = RenderComponent(parameters => @@ -346,7 +346,7 @@ public void BitCheckBoxIsIndeterminateTwoWayBoundWithCustomHandlerTest() Assert.IsFalse(BitCheckBoxIsIndeterminate); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -373,7 +373,7 @@ public void BitCheckBoxValidationFormTest(bool value) Assert.AreEqual(component.Instance.ValidCount, component.Instance.InvalidCount); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -403,7 +403,7 @@ public void BitCheckBoxValidationInvalidHtmlAttributeTest(bool value) Assert.AreEqual(value is false, checkBoxInput.HasAttribute("aria-invalid")); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false), ] diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Checkbox/BitCheckboxValidationTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Checkbox/BitCheckboxValidationTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Checkbox/BitCheckboxValidationTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Checkbox/BitCheckboxValidationTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/ChoiceGroup/BitChoiceGroupTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/ChoiceGroup/BitChoiceGroupTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/ChoiceGroup/BitChoiceGroupTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/ChoiceGroup/BitChoiceGroupTests.cs index 85b7e0a5bd..654d7927e2 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/ChoiceGroup/BitChoiceGroupTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/ChoiceGroup/BitChoiceGroupTests.cs @@ -9,7 +9,7 @@ namespace Bit.BlazorUI.Tests.Components.Inputs.ChoiceGroup; [TestClass] public class BitChoiceGroupTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -33,7 +33,7 @@ public void BitChoiceGroupShouldTakeCorrectEnableStyle(bool isEnabled) } } - [DataTestMethod] + [TestMethod] public void BitChoiceGroupShouldGenerateAllItems() { var choiceGroupItems = GetChoiceGroupItems(); @@ -48,7 +48,7 @@ public void BitChoiceGroupShouldGenerateAllItems() Assert.AreEqual(bitChoiceGroup.Count, choiceGroupItems.Count); } - [DataTestMethod] + [TestMethod] public void BitChoiceGroupShouldTakeCorrectIconName() { var choiceGroupItems = GetChoiceGroupItems(); @@ -66,7 +66,7 @@ public void BitChoiceGroupShouldTakeCorrectIconName() } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -103,7 +103,7 @@ public void BitChoiceGroupShouldRespectInputClick(bool isEnabled) } } - [DataTestMethod] + [TestMethod] public void BitChoiceGroupShouldTakeCorrectImageName() { var choiceGroupItems = GetChoiceGroupItems(); @@ -130,7 +130,7 @@ public void BitChoiceGroupShouldTakeCorrectImageName() } } - [DataTestMethod, + [TestMethod, DataRow("Detailed label") ] public void BitChoiceGroupShouldTakeCorrectLabel(string label) @@ -145,7 +145,7 @@ public void BitChoiceGroupShouldTakeCorrectLabel(string label) Assert.IsTrue(bitChoiceGroupLabel.InnerHtml.Contains(label)); } - [DataTestMethod, + [TestMethod, DataRow("I am a span") ] public void BitChoiceGroupShouldTakeCorrectLabelContent(string labelContent) @@ -160,7 +160,7 @@ public void BitChoiceGroupShouldTakeCorrectLabelContent(string labelContent) bitChoiceGroupLabelContent.MarkupMatches(labelContent); } - [DataTestMethod, + [TestMethod, DataRow("This is a AriaLabelledBy") ] public void BitChoiceGroupShouldTakeCorrectAria(string ariaLabelledBy) @@ -175,7 +175,7 @@ public void BitChoiceGroupShouldTakeCorrectAria(string ariaLabelledBy) Assert.AreEqual(bitChoiceGroup.GetAttribute("aria-labelledby"), ariaLabelledBy); } - [DataTestMethod, + [TestMethod, DataRow("color:red;") ] public void BitChoiceGroupShouldTakeCustomStyle(string customStyle) @@ -190,7 +190,7 @@ public void BitChoiceGroupShouldTakeCustomStyle(string customStyle) Assert.IsTrue(bitChoiceGroup?.GetAttribute("style")?.Contains(customStyle)); } - [DataTestMethod, + [TestMethod, DataRow("custom-class") ] public void BitChoiceGroupShouldTakeCustomClass(string customClass) @@ -205,7 +205,7 @@ public void BitChoiceGroupShouldTakeCustomClass(string customClass) Assert.IsTrue(bitChoiceGroup.ClassList.Contains(customClass)); } - [DataTestMethod, + [TestMethod, DataRow(BitVisibility.Visible), DataRow(BitVisibility.Hidden), DataRow(BitVisibility.Collapsed), diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/CircularTimePicker/BitCircularTimePickerTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/CircularTimePicker/BitCircularTimePickerTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/CircularTimePicker/BitCircularTimePickerTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/CircularTimePicker/BitCircularTimePickerTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/ColorPicker/BitColorPickerTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/ColorPicker/BitColorPickerTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/ColorPicker/BitColorPickerTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/ColorPicker/BitColorPickerTests.cs index 90a47a6943..93ecb85d6e 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/ColorPicker/BitColorPickerTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/ColorPicker/BitColorPickerTests.cs @@ -13,7 +13,7 @@ public void SetupJsInteropMode() Context.JSInterop.Mode = JSRuntimeMode.Loose; } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -41,7 +41,7 @@ public void BitColorPickerMustRespectUiChange(bool show) } } - [DataTestMethod, + [TestMethod, DataRow("#FC5603", "#FC5603", "rgb(252,86,3)", 1), DataRow("rgba(3,98,252,0.3)", "#0362FC", "rgb(3,98,252)", 0.3), DataRow("rgb(252,3,240)", "#FC03F0", "rgb(252,3,240)", 1) diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/ColorPicker/BitColorTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/ColorPicker/BitColorTests.cs similarity index 85% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/ColorPicker/BitColorTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/ColorPicker/BitColorTests.cs index 1302286829..10504c8d6a 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/ColorPicker/BitColorTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/ColorPicker/BitColorTests.cs @@ -6,7 +6,7 @@ namespace Bit.BlazorUI.Tests.Components.Inputs.ColorPicker; [TestClass] public class BitColorTests { - [DataTestMethod, DataRow("#5D0914")] + [TestMethod, DataRow("#5D0914")] public void BitColorHexToRgbTest(string color) { var bitColor = new BitInternalColor(color); @@ -17,7 +17,7 @@ public void BitColorHexToRgbTest(string color) Assert.AreEqual(1, bitColor.A); } - [DataTestMethod, DataRow("#5D0914", 0.6)] + [TestMethod, DataRow("#5D0914", 0.6)] public void BitColorHexToRgbaTest(string color, double alpha) { var bitColor = new BitInternalColor(color, alpha); @@ -28,7 +28,7 @@ public void BitColorHexToRgbaTest(string color, double alpha) Assert.AreEqual(bitColor.A, alpha); } - [DataTestMethod, DataRow("rgb(93,9,20)")] + [TestMethod, DataRow("rgb(93,9,20)")] public void BitColorRgbToHexTest(string color) { var bitColor = new BitInternalColor(color); @@ -37,7 +37,7 @@ public void BitColorRgbToHexTest(string color) Assert.AreEqual(1, bitColor.A); } - [DataTestMethod, DataRow("rgb(93,9,20)", 0.6)] + [TestMethod, DataRow("rgb(93,9,20)", 0.6)] public void BitColorRgbaToHexTest(string color, double alpha) { var bitColor = new BitInternalColor(color, alpha); @@ -46,7 +46,7 @@ public void BitColorRgbaToHexTest(string color, double alpha) Assert.AreEqual(alpha, bitColor.A); } - [DataTestMethod, DataRow((byte)93, (byte)9, (byte)20, 0.6)] + [TestMethod, DataRow((byte)93, (byte)9, (byte)20, 0.6)] public void BitColorSetRgbaTest(byte red, byte green, byte blue, double alpha) { var bitColor = new BitInternalColor(red, green, blue, alpha); @@ -55,7 +55,7 @@ public void BitColorSetRgbaTest(byte red, byte green, byte blue, double alpha) Assert.AreEqual(alpha, bitColor.A); } - [DataTestMethod, DataRow("#5d0914")] + [TestMethod, DataRow("#5d0914")] public void BitColorHexToHsvTest(string color) { var bitColor = new BitInternalColor(color); @@ -66,7 +66,7 @@ public void BitColorHexToHsvTest(string color) Assert.AreEqual(1, bitColor.A); } - [DataTestMethod, DataRow(352.143, 0.903, 0.365, 0.9)] + [TestMethod, DataRow(352.143, 0.903, 0.365, 0.9)] public void BitColorHsvToHexTest(double hue, double saturation, double value, double alpha) { var bitColor = new BitInternalColor(hue, saturation, value, alpha); diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/DatePicker/BitDatePickerTestModel.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/DatePicker/BitDatePickerTestModel.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/DatePicker/BitDatePickerTestModel.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/DatePicker/BitDatePickerTestModel.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/DatePicker/BitDatePickerTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/DatePicker/BitDatePickerTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/DatePicker/BitDatePickerTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/DatePicker/BitDatePickerTests.cs index 4ce4148eed..eb5a1f34b9 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/DatePicker/BitDatePickerTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/DatePicker/BitDatePickerTests.cs @@ -8,7 +8,7 @@ namespace Bit.BlazorUI.Tests.Components.Inputs.DatePicker; [TestClass] public class BitDatePickerTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false), ] @@ -31,7 +31,7 @@ public void BitDatePickerTest(bool isEnabled) } } - [DataTestMethod, DataRow("
This is labelTemplate
")] + [TestMethod, DataRow("
This is labelTemplate
")] public void BitDatePickerShouldRenderLabelTemplate(string labelTemplate) { var component = RenderComponent(parameters => @@ -43,7 +43,7 @@ public void BitDatePickerShouldRenderLabelTemplate(string labelTemplate) bitDatePickerLabelChild.MarkupMatches(labelTemplate); } - [DataTestMethod, DataRow("go to today text")] + [TestMethod, DataRow("go to today text")] public void BitDatePickerShouldGiveValueToGoToToday(string goToToday) { var component = RenderComponent(parameters => @@ -57,7 +57,7 @@ public void BitDatePickerShouldGiveValueToGoToToday(string goToToday) Assert.AreEqual(goToTodayButton.GetAttribute("title"), goToToday); } - [DataTestMethod, + [TestMethod, DataRow(true, 1), DataRow(false, 0) ] @@ -77,7 +77,7 @@ public void BitDatePickerShouldHandleOnClickEvent(bool isEnabled, int count) Assert.AreEqual(count, clickedValue); } - [DataTestMethod, + [TestMethod, DataRow(true, 1), DataRow(false, 0) ] @@ -101,7 +101,7 @@ public void BitDatePickerCalendarItemsShouldRespectIsEnabled(bool isEnabled, int Assert.AreEqual(count, changedDateValue); } - [DataTestMethod] + [TestMethod] public void BitDatePickerCalendarSelectTodayDate() { Context.JSInterop.Mode = JSRuntimeMode.Loose; @@ -122,7 +122,7 @@ public void BitDatePickerCalendarSelectTodayDate() Assert.AreEqual(component.Instance.Value.Value.Offset, DateTimeOffset.Now.Offset); } - [DataTestMethod] + [TestMethod] public void BitDatePickerValidationFormTest() { Context.JSInterop.Mode = JSRuntimeMode.Loose; @@ -153,7 +153,7 @@ public void BitDatePickerValidationFormTest() Assert.AreEqual(component.Instance.ValidCount, component.Instance.InvalidCount); } - [DataTestMethod] + [TestMethod] public void BitDatePickerValidationInvalidHtmlAttributeTest() { Context.JSInterop.Mode = JSRuntimeMode.Loose; @@ -185,7 +185,7 @@ public void BitDatePickerValidationInvalidHtmlAttributeTest() Assert.IsFalse(inputDate.HasAttribute("aria-invalid")); } - [DataTestMethod] + [TestMethod] public void BitDatePickerValidationInvalidCssClassTest() { Context.JSInterop.Mode = JSRuntimeMode.Loose; @@ -215,7 +215,7 @@ public void BitDatePickerValidationInvalidCssClassTest() Assert.IsFalse(bitDatePicker.ClassList.Contains("bit-inv")); } - [DataTestMethod, DataRow("DatePicker")] + [TestMethod, DataRow("DatePicker")] public void BitDatePickerAriaLabelTest(string pickerAriaLabel) { Context.JSInterop.Mode = JSRuntimeMode.Loose; @@ -230,7 +230,7 @@ public void BitDatePickerAriaLabelTest(string pickerAriaLabel) Assert.AreEqual(pickerAriaLabel, calloutAriaLabel); } - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -254,7 +254,7 @@ public void BitDatePickerShowGoToTodayTest(bool showGoToToday) } } - //[DataTestMethod, + //[TestMethod, // DataRow(false), // DataRow(true) //] @@ -278,7 +278,7 @@ public void BitDatePickerShowGoToTodayTest(bool showGoToToday) // } //} - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -302,7 +302,7 @@ public void BitDatePickerHighlightCurrentMonthTest(bool highlightCurrentMonth) } } - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -327,7 +327,7 @@ public void BitDatePickerHighlightSelectedMonthTest(bool highlightSelectedMonth) } } - [DataTestMethod] + [TestMethod] public void BitDatePickerCalloutHtmlAttributesTest() { Context.JSInterop.Mode = JSRuntimeMode.Loose; diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/DatePicker/BitDatePickerValidationTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/DatePicker/BitDatePickerValidationTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/DatePicker/BitDatePickerValidationTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/DatePicker/BitDatePickerValidationTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/DateRangePicker/BitDateRangePickerTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/DateRangePicker/BitDateRangePickerTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/DateRangePicker/BitDateRangePickerTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/DateRangePicker/BitDateRangePickerTests.cs index 669b48c7df..e1a8818b11 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/DateRangePicker/BitDateRangePickerTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/DateRangePicker/BitDateRangePickerTests.cs @@ -8,7 +8,7 @@ namespace Bit.BlazorUI.Tests.Components.Inputs.DateRangePicker; [TestClass] public class BitDateRangePickerTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false), ] @@ -31,7 +31,7 @@ public void BitDateRangePickerTest(bool isEnabled) } } - [DataTestMethod, DataRow("
This is labelFragment
")] + [TestMethod, DataRow("
This is labelFragment
")] public void BitDateRangePickerShouldRenderLabelFragment(string labelTemplate) { var component = RenderComponent(parameters => @@ -43,7 +43,7 @@ public void BitDateRangePickerShouldRenderLabelFragment(string labelTemplate) bitDateRangePickerLabelChild.MarkupMatches(labelTemplate); } - [DataTestMethod, DataRow("go to today text")] + [TestMethod, DataRow("go to today text")] public void BitDateRangePickerShouldGiveValueToGoToToday(string goToToday) { var component = RenderComponent(parameters => @@ -57,7 +57,7 @@ public void BitDateRangePickerShouldGiveValueToGoToToday(string goToToday) Assert.AreEqual(goToToday, goToTodayButton.GetAttribute("title")); } - [DataTestMethod, + [TestMethod, DataRow(true, 1), DataRow(false, 0) ] @@ -77,7 +77,7 @@ public void BitDateRangePickerShouldHandleOnClickEvent(bool isEnabled, int count Assert.AreEqual(count, clickedValue); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -101,7 +101,7 @@ public void BitDateRangePickerCalendarItemsShouldRespectIsEnabled(bool isEnabled Assert.AreEqual(isEnabled ? 1 : 0, changeValue); } - [DataTestMethod] + [TestMethod] public void BitDateRangePickerCalendarSelectTodayDate() { var isOpen = true; @@ -133,7 +133,7 @@ public void BitDateRangePickerCalendarSelectTodayDate() Assert.AreEqual(component.Instance.Value.EndDate.Value.Offset, DateTimeOffset.Now.Offset); } - [DataTestMethod, + [TestMethod, DataRow("DateRangePicker") ] public void BitDateRangePickerAriaLabelTest(string pickerAriaLabel) @@ -150,7 +150,7 @@ public void BitDateRangePickerAriaLabelTest(string pickerAriaLabel) Assert.AreEqual(pickerAriaLabel, calloutAriaLabel); } - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -174,7 +174,7 @@ public void BitDateRangePickerShowGoToTodayTest(bool showGoToToday) } } - //[DataTestMethod, + //[TestMethod, // DataRow(false), // DataRow(true) //] @@ -198,7 +198,7 @@ public void BitDateRangePickerShowGoToTodayTest(bool showGoToToday) // } //} - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -222,7 +222,7 @@ public void BitDateRangePickerHighlightCurrentMonthTest(bool highlightCurrentMon } } - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -247,7 +247,7 @@ public void BitDateRangePickerHighlightSelectedMonthTest(bool highlightSelectedM } } - [DataTestMethod] + [TestMethod] public void BitDateRangePickerCalloutHtmlAttributesTest() { Context.JSInterop.Mode = JSRuntimeMode.Loose; diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownMultiSelectTestModel.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownMultiSelectTestModel.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownMultiSelectTestModel.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownMultiSelectTestModel.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownMultiSelectValidationTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownMultiSelectValidationTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownMultiSelectValidationTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownMultiSelectValidationTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownTestModel.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownTestModel.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownTestModel.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownTestModel.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownTests.cs similarity index 98% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownTests.cs index e37bcf69b3..7f3a002bed 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownTests.cs @@ -13,7 +13,7 @@ public class BitDropdownTests : BunitTestContext private string? _bitDropdownValue; private IEnumerable? _bitDropdownValues; - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -38,7 +38,7 @@ public void BitDropdownTest(bool isEnabled) } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -68,7 +68,7 @@ public void ResponsiveDropdownShouldTakeCorrectClassNameAndRenderElements(bool i //} } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("BitDrop") ] @@ -92,7 +92,7 @@ public void ResponsiveDropdownShouldRenderLabel(string labelFragment) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("
This is labelFragment
"), ] @@ -121,7 +121,7 @@ public void ResponsiveDropdownShouldRenderLabelFragment(string labelFragment) } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -141,7 +141,7 @@ public void BitDropdownOnClickShouldWorkCorrect(bool isEnabled) Assert.AreEqual(isEnabled, clicked); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -170,7 +170,7 @@ public void BitDropdownIsMultiSelectShouldWorkCorrect(bool isMultiSelect) } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -200,7 +200,7 @@ public void BitDropdownItemsShouldRenderCorrect(bool isMultiSelect) } } - [DataTestMethod, + [TestMethod, DataRow("f-ban"), DataRow("f-app") ] @@ -221,7 +221,7 @@ public void BitDropdownTextWithDefaultValueShouldInitCorrect(string defaultValue Assert.AreEqual(expectedText, textSpan.InnerHtml); } - [DataTestMethod, + [TestMethod, DataRow("f-ban"), DataRow("f-app,f-ban") ] @@ -255,7 +255,7 @@ public void BitDropdownTextWithDefaultValuesShouldInitCorrect(string defaultValu Assert.AreEqual(expectedText, textSpan.InnerHtml); } - [DataTestMethod, + [TestMethod, DataRow("f-ban", "f-app"), DataRow("f-app", null) ] @@ -277,7 +277,7 @@ public void BitDropdownTextWithValueShouldInitCorrect(string value, string defau Assert.AreEqual(expectedText, textSpan.InnerHtml); } - [DataTestMethod, + [TestMethod, DataRow("f-ban", "f-app,f-ban"), DataRow("f-app,f-ban", "f-ban") ] @@ -311,7 +311,7 @@ public void BitDropdownTextWithValuesAndDefaultValuesShouldInitCorrect(string de Assert.AreEqual(expectedText.ToString(), textSpan.InnerHtml); } - [DataTestMethod, + [TestMethod, DataRow(null, "f-app,f-ban", true, "Select options"), DataRow(null, null, true, "Select options"), DataRow("f-ban", null, false, "Select option"), @@ -370,7 +370,7 @@ public void BitDropdownPlaceholderShouldWorkCorrect(string value, string values, Assert.AreEqual(expectedText.ToString(), targetSpan.InnerHtml); } - [DataTestMethod, + [TestMethod, DataRow("Drop down"), DataRow(null) ] @@ -393,7 +393,7 @@ public void BitDropdownLabelShouldWorkCorrect(string label) } } - [DataTestMethod, + [TestMethod, DataRow("
This is labelFragment
") ] public void BitDropdownLabelFragmentTest(string labelFragment) @@ -409,7 +409,7 @@ public void BitDropdownLabelFragmentTest(string labelFragment) drpLabelChild.MarkupMatches(labelFragment); } - [DataTestMethod, + [TestMethod, DataRow("Drop Down"), DataRow(null) ] @@ -427,7 +427,7 @@ public void BitDropdownTitleTest(string title) Assert.AreEqual(title, drpWrapper.GetAttribute("title")); } - [DataTestMethod, + [TestMethod, DataRow(true, "f-app"), DataRow(false, "f-app"), ] @@ -455,7 +455,7 @@ public void BitDropdownNotifyOnReselectShouldWorkCorrect(bool notifyOnReselect, Assert.AreEqual(notifyOnReselect, itemSelected); } - [DataTestMethod, + [TestMethod, DataRow(true, true), DataRow(false, true), @@ -500,7 +500,7 @@ public void BitDropdownEnableItemSelectionShouldWorkCorrect(bool itemIsEnabled, } } - [DataTestMethod, + [TestMethod, DataRow("f-ban"), DataRow("f-ora"), DataRow("v-bro") @@ -530,7 +530,7 @@ public void BitDropdownTwoWayBoundWithCustomHandlerShouldWorkCorrect(string valu Assert.AreEqual(expectedValue, _bitDropdownValue); } - [DataTestMethod, + [TestMethod, DataRow("f-ban,v-bro"), DataRow("f-ora") ] @@ -569,7 +569,7 @@ public void BitDropdownMultiSelectTwoWayBoundWithCustomHandlerShouldWorkCorrect( Assert.AreEqual(expectedResult, _bitDropdownValues.Count()); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("f-ora") ] @@ -612,7 +612,7 @@ public void BitDropdownValidationFormTest(string value) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("f-ban,v-bro"), DataRow("f-ora") @@ -661,7 +661,7 @@ public void BitDropdownMultiSelectValidationFormTest(string values) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("f-ora") ] @@ -706,7 +706,7 @@ public void BitDropdownValidationInvalidHtmlAttributeTest(string value) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("f-ban,v-bro"), DataRow("f-ora") @@ -759,7 +759,7 @@ public void BitDropdownMultiSelectValidationInvalidHtmlAttributeTest(string valu } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("f-ora") ] @@ -800,7 +800,7 @@ public void BitDropdownValidationInvalidCssClassTest(string value) Assert.IsFalse(bitDropdown.ClassList.Contains("bit-inv")); } - [DataTestMethod, + [TestMethod, DataRow(true, null), DataRow(true, "Search items"), DataRow(false, null), @@ -838,7 +838,7 @@ public void BitDropdownShowSearchBoxTest(bool showSearchBox, string searchBoxPla } } - [DataTestMethod, + [TestMethod, DataRow(null, false), DataRow("app", false), DataRow(null, true), @@ -877,7 +877,7 @@ public void BitDropdownSearchItemTest(string search, bool isMultiSelect) } } - [DataTestMethod, + [TestMethod, DataRow(false, null, null, false), DataRow(false, 3_000_000, null, false), DataRow(false, null, 4, false), @@ -964,7 +964,7 @@ public void BitDropdownVirtualizeTest(bool virtualize, int? itemSize, int? overs AppContext.SetData("Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.MaxItemCount", null); } - [DataTestMethod, + [TestMethod, DataRow("WindowsLogo"), DataRow("ChevronUp"), DataRow(null) @@ -990,7 +990,7 @@ public void BitDropdownCaretDownIconNameTest(string? iconName) } } - [DataTestMethod, + [TestMethod, DataRow("This is CaretDownTemplate"), DataRow(null) ] @@ -1016,7 +1016,7 @@ public void BitDropdownCaretDownTemplateTest(string iconFragment) } } - [DataTestMethod, + [TestMethod, DataRow(BitDir.Rtl), DataRow(BitDir.Ltr) ] diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownValidationTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownValidationTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownValidationTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Dropdown/BitDropdownValidationTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/FileUpload/BitFileUploadTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/FileUpload/BitFileUploadTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/FileUpload/BitFileUploadTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/FileUpload/BitFileUploadTests.cs index d90edf040d..acae55c13a 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/FileUpload/BitFileUploadTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/FileUpload/BitFileUploadTests.cs @@ -7,7 +7,7 @@ namespace Bit.BlazorUI.Tests.Components.Inputs.FileUpload; [TestClass] public class BitFileUploadTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -23,7 +23,7 @@ public void BitUploadFileHasBasicClass(bool isEnabled) Assert.IsNotNull(bitFileUpload); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -52,7 +52,7 @@ public void BitFileUploadAcceptAttributeTest() Assert.AreEqual(".mp4,.mp3", attribute); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/NumberField/BitNumberFieldTestModel.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/NumberField/BitNumberFieldTestModel.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/NumberField/BitNumberFieldTestModel.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/NumberField/BitNumberFieldTestModel.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/NumberField/BitNumberFieldTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/NumberField/BitNumberFieldTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/NumberField/BitNumberFieldTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/NumberField/BitNumberFieldTests.cs index 41ca409576..cf26c7838f 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/NumberField/BitNumberFieldTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/NumberField/BitNumberFieldTests.cs @@ -19,7 +19,7 @@ public void SetupJsInteropMode() Context.JSInterop.Mode = JSRuntimeMode.Loose; } - [DataTestMethod, DataRow("The placeholder")] + [TestMethod, DataRow("The placeholder")] public void BitNumberFieldShouldHaveCorrectPlaceholder(string placeholder) { var component = RenderComponent>(parameters => @@ -33,7 +33,7 @@ public void BitNumberFieldShouldHaveCorrectPlaceholder(string placeholder) Assert.AreEqual(numericTextFieldPlaceholder.GetAttribute("placeholder"), placeholder); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("The Label") ] @@ -55,7 +55,7 @@ public void BitNumberFieldShouldHaveCorrectLabel(string label) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(BitSpinButtonMode.Compact), DataRow(BitSpinButtonMode.Inline), @@ -80,7 +80,7 @@ public void BitNumberFieldShouldRenderCorrectlyWithArrows(BitSpinButtonMode? mod } } - [DataTestMethod, + [TestMethod, DataRow(null, null), DataRow("IncreaseIndentLegacy", null), DataRow("IncreaseIndentLegacy", "BitNumberFieldButtonIcon") @@ -110,7 +110,7 @@ public void BitNumberFieldShouldRenderCorrectIconWithEnableArrows(string iconNam } } - [DataTestMethod, + [TestMethod, DataRow(null, null), DataRow("IncreaseIndentLegacy", null), DataRow("IncreaseIndentLegacy", "BitNumberFieldButtonIcon") @@ -139,7 +139,7 @@ public void BitNumberFieldShouldRenderCorrectIcon(string iconName, string iconAr } } - [DataTestMethod, + [TestMethod, DataRow("IncreaseIndentLegacy", null, true), DataRow("IncreaseIndentLegacy", null, false), DataRow("IncreaseIndentLegacy", "BitNumberFieldButtonIcon", true), @@ -168,7 +168,7 @@ public void BitNumberFieldShouldRenderCorrectIncrementButton(string iconName, st } } - [DataTestMethod, + [TestMethod, DataRow("IncreaseIndentLegacy", null, true), DataRow("IncreaseIndentLegacy", null, false), DataRow("IncreaseIndentLegacy", "BitNumberFieldButtonIcon", true), @@ -197,7 +197,7 @@ public void BitNumberFieldShouldRenderCorrectDecrementButton(string iconName, st } } - [DataTestMethod, + [TestMethod, DataRow("0", 11), DataRow("C2", 100), DataRow("0:00000", 1363) @@ -217,7 +217,7 @@ public void BitNumberFieldShouldHaveNumberFormaWhenItsPropertySet(string numberF Assert.AreEqual(expectedValue, inputValue); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(BitLabelPosition.Start), DataRow(BitLabelPosition.End), @@ -244,7 +244,7 @@ public void BitNumberFieldShouldHaveLabelPositionClassName(BitLabelPosition? lab Assert.IsTrue(numberFieldButton.ClassList.Contains(lblClass)); } - [DataTestMethod, + [TestMethod, DataRow("dir", "ltr"), DataRow("foo", "bar") ] @@ -260,7 +260,7 @@ public void BitNumberFieldInputShouldHaveHtmlAttributes(string attrKey, string a Assert.AreEqual(attrValue, input.GetAttribute(attrKey)); } - [DataTestMethod, + [TestMethod, DataRow("NtfWrapper", null, null, null), DataRow(null, "NftAriaLabel", null, null), DataRow("NtfWrapper", "NftAriaLabel", 5, 3), @@ -295,7 +295,7 @@ public void BitNumberFieldWrapperShouldHaveCorrectAttributes(string title, strin } } - [DataTestMethod, + [TestMethod, DataRow(null, null), DataRow("0", null), DataRow("10", null), @@ -333,7 +333,7 @@ public void BitNumberFieldShouldHaveCorrectMaxMin(string min, string max) } [Ignore] - [DataTestMethod, + [TestMethod, DataRow(3), DataRow(5) ] @@ -358,7 +358,7 @@ public async Task BitNumberFieldOnIncrementTest(int countOfClicks) } [Ignore] - [DataTestMethod, + [TestMethod, DataRow(3), DataRow(5) ] @@ -382,7 +382,7 @@ public async Task BitNumberFieldOnDecrementTest(int countOfClicks) Assert.AreEqual(20 - countOfClicks, onDecrementEventCounter); } - [DataTestMethod, + [TestMethod, DataRow(4), DataRow(12) ] @@ -403,7 +403,7 @@ public void BitNumberFieldInputOnBlurEventCallbackTest(int countOfBlur) Assert.AreEqual(onBlurEventCounter, countOfBlur); } - [DataTestMethod, + [TestMethod, DataRow(4), DataRow(12) ] @@ -424,7 +424,7 @@ public void BitNumberFieldInputOnFocusTest(int countOfFocus) Assert.AreEqual(onFocusEventCounter, countOfFocus); } - [DataTestMethod, + [TestMethod, DataRow(4), DataRow(12) ] @@ -442,7 +442,7 @@ public void BitNumberFieldOnChangeTest(int inputValue) Assert.AreEqual(onChangeEventValue, inputValue); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("AriaDescription") ] @@ -458,7 +458,7 @@ public void BitNumberFieldShouldHaveCorrectAriaDescription(string ariaDescriptio Assert.AreEqual(ariaDescription, input.GetAttribute("aria-describedby")); } - [DataTestMethod, + [TestMethod, DataRow(3, null), DataRow(3, "{0} cm"), DataRow(null, null) @@ -488,7 +488,7 @@ public void BitNumberFieldInputShouldHaveCorrectAriaValueNow(int? ariaValueNow, } } - [DataTestMethod, + [TestMethod, DataRow("3", null), DataRow(null, "00"), DataRow(null, null) @@ -513,7 +513,7 @@ public void BitNumberFieldInputShouldHaveCorrectAriaValueText(string ariaValueTe Assert.AreEqual(expectedResult, input.GetAttribute("aria-valuetext")); } - [DataTestMethod, + [TestMethod, DataRow(3, "1", "12"), DataRow(8, "2", "10"), DataRow(8, "1", "8"), @@ -541,7 +541,7 @@ public void BitNumberFieldIncrementButtonClickTest(int defaultValue, string step Assert.AreEqual(inputValue, expectedResult.ToString()); } - [DataTestMethod, + [TestMethod, DataRow(3, "1", "12"), DataRow(8, "2", "10"), DataRow(8, "1", "8"), @@ -571,7 +571,7 @@ public void BitNumberFieldArrowUpKeyDownTest(int defaultValue, string step, stri Assert.AreEqual(expectedResult.ToString(), inputValue); } - [DataTestMethod, + [TestMethod, DataRow(3, "1", "0"), DataRow(2, "2", "0"), DataRow(3, "4", "0"), @@ -598,7 +598,7 @@ public void BitNumberFieldDecrementButtonClickTest(int defaultValue, string step Assert.AreEqual(inputValue, expectedResult.ToString()); } - [DataTestMethod, + [TestMethod, DataRow(3, "1", "0"), DataRow(2, "2", "0"), DataRow(3, "4", "0"), @@ -627,7 +627,7 @@ public void BitNumberFieldArrowDownKeyDownTest(int defaultValue, string step, st Assert.AreEqual(expectedResult.ToString(), inputValue); } - [DataTestMethod, + [TestMethod, DataRow(50.02, "0", "100", "25"), DataRow(50.02, "0", "100", "112.2"), DataRow(50.02, "0", "100", "62.72"), @@ -672,7 +672,7 @@ public void BitNumberFieldEnterKeyDownTest(double defaultValue, string min, stri Assert.AreEqual(expectedResult, inputValue); } - [DataTestMethod, + [TestMethod, DataRow(5, "0", "100", "25"), DataRow(5, "0", "100", "112"), DataRow(5, "0", "100", "-5"), @@ -713,7 +713,7 @@ public void BitNumberFieldOnBlurTest(double defaultValue, string min, string max Assert.AreEqual(expectedResult, inputValue); } - [DataTestMethod, + [TestMethod, DataRow("0", "100", "1", "25"), DataRow("0", "100", "2", "25"), DataRow("0", "100", "25", "12"), @@ -744,7 +744,7 @@ public void BitNumberFieldPrecisionTest(string min, string max, string step, str } [Ignore] - [DataTestMethod, + [TestMethod, DataRow(5, 2, "4"), DataRow(1, 15, "1") ] @@ -773,7 +773,7 @@ public async Task BitNumberFieldTwoWayBoundWithCustomHandlerShouldWorkCorrect(in Assert.AreEqual(expectedValue, BitNumberFieldTwoWayBoundValue); } - [DataTestMethod, DataRow("
This is labelFragment
")] + [TestMethod, DataRow("
This is labelFragment
")] public void BitNumberFieldLabelFragmentTest(string labelFragment) { var component = RenderComponent>(parameters => @@ -786,7 +786,7 @@ public void BitNumberFieldLabelFragmentTest(string labelFragment) } [Ignore] - [DataTestMethod, + [TestMethod, DataRow(3, "1", "100", 475), DataRow(3, "1", "100", 550) ] @@ -812,7 +812,7 @@ public void BitNumberFieldContinuousIncrementOnPointerDownTest(int defaultValue, } [Ignore] - [DataTestMethod, + [TestMethod, DataRow(50, "1", "0", 475), DataRow(50, "1", "0", 550) ] @@ -837,7 +837,7 @@ public void BitNumberFieldContinuousDecrementOnPointerDownTest(int defaultValue, TimeSpan.FromMilliseconds(timeout)); } - [DataTestMethod, + [TestMethod, DataRow(4), DataRow(10), DataRow(0), @@ -878,7 +878,7 @@ public void BitNumberFieldValidationFormTest(int value) Assert.AreEqual(component.Instance.ValidCount, component.Instance.InvalidCount); } - [DataTestMethod, + [TestMethod, DataRow(4), DataRow(10), DataRow(0), @@ -920,7 +920,7 @@ public void BitNumberFieldValidationInvalidHtmlAttributeTest(int value) } } - [DataTestMethod, + [TestMethod, DataRow(2), DataRow(8) ] diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/NumberField/BitNumberFieldValidationTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/NumberField/BitNumberFieldValidationTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/NumberField/BitNumberFieldValidationTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/NumberField/BitNumberFieldValidationTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/OtpInput/BitOtpInputTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/OtpInput/BitOtpInputTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/OtpInput/BitOtpInputTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/OtpInput/BitOtpInputTests.cs index 3ff2a224a4..66e5a735b1 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/OtpInput/BitOtpInputTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/OtpInput/BitOtpInputTests.cs @@ -6,7 +6,7 @@ namespace Bit.BlazorUI.Tests.Components.Inputs.OtpInput; [TestClass] public class BitOtpInputTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -29,7 +29,7 @@ public void BitOtpInputTest(bool isEnabled) } } - [DataTestMethod, + [TestMethod, DataRow(4), DataRow(6) ] @@ -45,7 +45,7 @@ public void BitOtpInputLengthTest(int length) Assert.AreEqual(length, bitOtpInput.Children.Length); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -68,7 +68,7 @@ public void BitOtpInputReversedTest(bool reversed) } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -91,7 +91,7 @@ public void BitOtpInputVerticalTest(bool vertical) } } - [DataTestMethod, + [TestMethod, DataRow(BitInputType.Text), DataRow(BitInputType.Number), DataRow(BitInputType.Password) diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Rating/BitRatingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Rating/BitRatingTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Rating/BitRatingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Rating/BitRatingTests.cs index 86045f3d5a..6ab963265d 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Rating/BitRatingTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Rating/BitRatingTests.cs @@ -7,7 +7,7 @@ namespace Bit.BlazorUI.Tests.Components.Inputs.Rating; [TestClass] public class BitRatingTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -60,7 +60,7 @@ public void BitRatingShouldRespectReadOnly() } - [DataTestMethod, + [TestMethod, DataRow(5), DataRow(8) ] @@ -76,7 +76,7 @@ public void BitRatingShouldShowCorrectMax(int max) Assert.AreEqual(max, button.Count); } - [DataTestMethod, + [TestMethod, DataRow("Select {0} of {1} stars")] public void BitRatingShouldTakeCorrectAriaLabelFormat(string ariaLabelFormat) { @@ -88,7 +88,7 @@ public void BitRatingShouldTakeCorrectAriaLabelFormat(string ariaLabelFormat) Assert.AreEqual(string.Format(ariaLabelFormat, 1, 5), span.TextContent); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(BitSize.Small), DataRow(BitSize.Large) @@ -107,7 +107,7 @@ public void BitRatingShouldRespectSize(BitSize size) } [Ignore("bypassed - BUnit 2-way bound parameters issue")] - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -150,7 +150,7 @@ public void BitRatingShouldTakeCustomIcon() } [Ignore("bypassed - BUnit 2-way bound parameters issue")] - [DataTestMethod, + [TestMethod, DataRow(10, 3, true, false, 3), DataRow(10, 2, false, false, 1), DataRow(10, 0, true, true, 1), @@ -187,7 +187,7 @@ public void BitRatingShouldRespectClickIndex(int max, int clickedIndex, bool isE Assert.AreEqual((!isEnabled || readOnly) ? max - 1 : max - clickedIndex, unselectedBitRatingIconCount); } - [DataTestMethod, DataRow("Detailed label")] + [TestMethod, DataRow("Detailed label")] public void BitRatingAriaLabelTest(string ariaLabel) { var com = RenderComponent(parameters => @@ -203,7 +203,7 @@ public void BitRatingAriaLabelTest(string ariaLabel) [Ignore("bypassed - BUnit 2-way bound parameters issue")] - [DataTestMethod, + [TestMethod, DataRow(5, 2, "HeartFill", "Heart"), DataRow(5, 3, "HeartFill", "Heart"), DataRow(5, 1.25, "HeartFill", "Heart"), @@ -228,7 +228,7 @@ public void BitRatingShouldRespectRatingValue(int max, double value, string icon } [Ignore("bypassed - BUnit 2-way bound parameters issue")] - [DataTestMethod, + [TestMethod, DataRow(5, 0, 2, "HeartFill", "Heart"), DataRow(5, 0, 3, "HeartFill", "Heart"), DataRow(5, 0, 1.25, "HeartFill", "Heart"), diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/SearchBox/BitSearchBoxTestModel.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/SearchBox/BitSearchBoxTestModel.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/SearchBox/BitSearchBoxTestModel.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/SearchBox/BitSearchBoxTestModel.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/SearchBox/BitSearchBoxTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/SearchBox/BitSearchBoxTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/SearchBox/BitSearchBoxTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/SearchBox/BitSearchBoxTests.cs index 26fd05ce27..5eacc9fb9a 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/SearchBox/BitSearchBoxTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/SearchBox/BitSearchBoxTests.cs @@ -6,7 +6,7 @@ namespace Bit.BlazorUI.Tests.Components.Inputs.SearchBox; [TestClass] public class BitSearchBoxTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow("Search"), DataRow("Filter")] public void SearchBoxPlaceholderMeetEnteredValue(string componentPlaceholder) @@ -19,7 +19,7 @@ public void SearchBoxPlaceholderMeetEnteredValue(string componentPlaceholder) Assert.AreEqual(componentPlaceholder, inputPlaceholder); } - [DataTestMethod, + [TestMethod, DataRow("Search"), DataRow("Closed Issue"), DataRow("fake value")] @@ -33,7 +33,7 @@ public void SearchBoxDefaultValueMeetEnteredValue(string value) Assert.AreEqual(value, inputValue); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false)] public void SearchBoxNoAnimationShouldHaveClassName(bool disableAnimation) @@ -45,7 +45,7 @@ public void SearchBoxNoAnimationShouldHaveClassName(bool disableAnimation) Assert.AreEqual(disableAnimation, searchBox.ClassList.Contains("bit-srb-nan")); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false)] public void SearchBoxUnderlinedShouldHaveClassName(bool isUnderlined) @@ -57,7 +57,7 @@ public void SearchBoxUnderlinedShouldHaveClassName(bool isUnderlined) Assert.AreEqual(isUnderlined, searchBox.ClassList.Contains("bit-srb-und")); } - [DataTestMethod, + [TestMethod, DataRow("Detailed label")] public void BitSearchBoxAriaLabelTest(string ariaLabel) { @@ -68,7 +68,7 @@ public void BitSearchBoxAriaLabelTest(string ariaLabel) Assert.IsTrue(bitSearchBox?.GetAttribute("aria-label")?.Equals(ariaLabel)); } - [DataTestMethod, + [TestMethod, DataRow("hello world", "hello bit"), DataRow(null, "hello bit"), DataRow("hello world", null) @@ -87,7 +87,7 @@ public void BitSearchBoxShouldTakeDefaultValue(string? value, string defaultValu Assert.AreEqual(input.GetAttribute("value"), actualValue); } - [DataTestMethod, + [TestMethod, DataRow("hello world", true), DataRow("hello world", false) ] @@ -105,7 +105,7 @@ public void BitSearchBoxedMustShowSearchIconEvenHasValueWhenShowIconTrue(string } [Ignore("bypassed - BUnit oninput event issue")] - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -125,7 +125,7 @@ public void BitSearchBoxMustRespondToTheChangeEvent(bool isEnabled) Assert.AreEqual(isEnabled ? 1 : 0, currentCount); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("off"), DataRow("email") @@ -151,7 +151,7 @@ public void BitSearchBoxAutoCompleteTest(string autoComplete) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("abc123"), DataRow("test@bit-components.com"), @@ -191,7 +191,7 @@ public void BitSearchBoxValidationFormTest(string value) Assert.AreEqual(component.Instance.ValidCount, component.Instance.InvalidCount); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("abc123"), DataRow("test@bit-components.com"), @@ -232,7 +232,7 @@ public void BitSearchBoxValidationInvalidHtmlAttributeTest(string value) } } - [DataTestMethod, + [TestMethod, DataRow("abc123"), DataRow("test@bit.com") ] diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/SearchBox/BitSearchBoxValidationTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/SearchBox/BitSearchBoxValidationTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/SearchBox/BitSearchBoxValidationTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/SearchBox/BitSearchBoxValidationTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Slider/BitSliderTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Slider/BitSliderTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Slider/BitSliderTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Slider/BitSliderTests.cs index de94114400..6627b48c22 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Slider/BitSliderTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Slider/BitSliderTests.cs @@ -13,7 +13,7 @@ public void SetupJsInteropMode() Context.JSInterop.Mode = JSRuntimeMode.Loose; } - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -28,7 +28,7 @@ public void BitSliderVerticalTest(bool isVertical) Assert.IsTrue(bitSlider.ClassList.Contains(isVertical ? "bit-sld-vrt" : "bit-sld-hrz")); } - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -44,7 +44,7 @@ public void BitSliderRangedVerticalTest(bool vertical) Assert.IsTrue(bitSlider.ClassList.Contains($"bit-sld-rgd-{(vertical ? "vrt" : "hrz")}")); } - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -68,7 +68,7 @@ public void BitSliderEnabledTest(bool isEnabled) } - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -85,7 +85,7 @@ public void BitSliderRangedTest(bool ranged) Assert.AreEqual(ranged ? 2 : 1, bitSlider.GetElementsByTagName("input").Length); } - [DataTestMethod, + [TestMethod, DataRow(-1000, 3D), DataRow(2, null), DataRow(2, 3D), @@ -110,7 +110,7 @@ public void BitSliderDefaultLowerValueTest(double lowerValue, double? defaultLow Assert.AreEqual(expectedValue.GetValueOrDefault().ToString(), label.TextContent); } - [DataTestMethod, + [TestMethod, DataRow(-1000, 3D), DataRow(2, null), DataRow(2, 3D), @@ -136,7 +136,7 @@ public void BitSliderDefaultUpperValueTest(double upperValue, double? defaultUpp Assert.AreEqual(expectedValue.GetValueOrDefault().ToString(), labels[^1].TextContent); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(2) ] @@ -155,7 +155,7 @@ public void BitSliderLowerValueTest(double lowerValue) Assert.AreEqual(lowerValue.ToString(), label.TextContent); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(2), ] @@ -175,7 +175,7 @@ public void BitSliderUpperValueTest(int? defaultUpperValue) Assert.AreEqual(defaultUpperValue.GetValueOrDefault().ToString(), labels[^1].TextContent); } - [DataTestMethod, + [TestMethod, DataRow(2, 6), DataRow(0, 10) ] @@ -196,7 +196,7 @@ public void BitSliderLowerAndUpperValueTest(double lowerValue, double upperValue Assert.AreEqual(upperValue.ToString(), labels[^1].TextContent); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(2) ] @@ -214,7 +214,7 @@ public void BitSliderDefaultValueTest(int? defaultValue) Assert.AreEqual(defaultValue.GetValueOrDefault().ToString(), label.TextContent); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(2) ] @@ -233,7 +233,7 @@ public void BitSliderVerticalDefaultValueTest(int? defaultValue) Assert.AreEqual(defaultValue.GetValueOrDefault().ToString(), label.TextContent); } - [DataTestMethod, + [TestMethod, DataRow(5), DataRow(2) ] @@ -251,7 +251,7 @@ public void BitSliderValueTest(double value) Assert.AreEqual(value.ToString(), label.TextContent); } - [DataTestMethod, + [TestMethod, DataRow(5), DataRow(2) ] @@ -270,7 +270,7 @@ public void BitSliderVerticalValueTest(double value) Assert.AreEqual(value.ToString(), label.TextContent); } - [DataTestMethod, + [TestMethod, DataRow(false, null), DataRow(true, null), DataRow(false, 2D), @@ -298,7 +298,7 @@ public void BitSliderStepTest(bool ranged, double? step) } } - [DataTestMethod, + [TestMethod, DataRow(false, 4, 8), DataRow(true, 4, 8) ] @@ -321,7 +321,7 @@ public void BitSliderMinMaxTest(bool ranged, int min, int max) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("Bit Title") ] @@ -348,7 +348,7 @@ public void BitSliderLabelTest(string label) } } - [DataTestMethod, + [TestMethod, DataRow(false, false), DataRow(true, false), DataRow(false, true), @@ -375,7 +375,7 @@ public void BitSliderShowValueTest(bool ranged, bool showValue) } } - [DataTestMethod, + [TestMethod, DataRow(false, false), DataRow(true, false), DataRow(false, true), @@ -394,7 +394,7 @@ public void BitSliderOriginFromZeroTest(bool ranged, bool originFromZero) Assert.AreEqual(originFromZero ? 1 : 0, spans.Count); } - [DataTestMethod, + [TestMethod, DataRow(false, null), DataRow(true, null), DataRow(false, "P01"), diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/TextField/BitTextFieldTestModel.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/TextField/BitTextFieldTestModel.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/TextField/BitTextFieldTestModel.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/TextField/BitTextFieldTestModel.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/TextField/BitTextFieldTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/TextField/BitTextFieldTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/TextField/BitTextFieldTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/TextField/BitTextFieldTests.cs index 430852731b..505f194ab8 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/TextField/BitTextFieldTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/TextField/BitTextFieldTests.cs @@ -7,7 +7,7 @@ namespace Bit.BlazorUI.Tests.Components.Inputs.TextField; [TestClass] public class BitTextFieldTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(true, true, true), DataRow(false, true, false), DataRow(true, false, true), @@ -40,7 +40,7 @@ public void BitTextFieldShouldTakeCorrectTypeAndVisual(bool isEnabled, bool mult Assert.AreEqual(required, bitTextField.ClassList.Contains("bit-tfl-req")); } - [DataTestMethod, + [TestMethod, DataRow(true, "hello world"), DataRow(false, "hello world") ] @@ -57,7 +57,7 @@ public void BitTextFieldShouldTakeValue(bool multiline, string value) Assert.AreEqual(bitTextField.GetAttribute("value"), value); } - [DataTestMethod, DataRow("this is label")] + [TestMethod, DataRow("this is label")] public void BitTextFieldLabel(string label) { var com = RenderComponent(parameters => @@ -70,7 +70,7 @@ public void BitTextFieldLabel(string label) Assert.AreEqual(label, bitTextFieldLabel); } - [DataTestMethod, + [TestMethod, DataRow(15, true, "this is placeholder", true), DataRow(15, true, "this is placeholder", false), DataRow(15, false, "this is placeholder", true), @@ -97,7 +97,7 @@ public void BitTextFieldShouldTakeBaseParameters(int maxLength, bool multiline, Assert.AreEqual(readOnly, bitTextField.HasAttribute("readonly")); } - [DataTestMethod, DataRow("Emoji2")] + [TestMethod, DataRow("Emoji2")] public void BitTextFieldShouldAcceptIcon(string iconName) { var component = RenderComponent(parameters => @@ -110,7 +110,7 @@ public void BitTextFieldShouldAcceptIcon(string iconName) Assert.IsTrue(bitTextFieldIcon.ClassList.Contains($"bit-icon--{iconName}")); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false), ] @@ -136,7 +136,7 @@ public void BitTextFieldCanRevealPassword(bool isEnabled) Assert.IsTrue(revealPasswordIcon.ClassList.Contains($"bit-icon--Hide3")); } - [DataTestMethod, + [TestMethod, DataRow(BitInputType.Password), DataRow(BitInputType.Number), DataRow(BitInputType.Tel) @@ -153,7 +153,7 @@ public void BitInputTypeTest(BitInputType type) Assert.AreEqual(type.GetDisplayName(toLowerDisplayName: true), textField.GetAttribute("type")); } - [DataTestMethod, + [TestMethod, DataRow(true, false), DataRow(true, true), DataRow(false, false), @@ -176,7 +176,7 @@ public void BitTextFieldMustRespondToTheClickEvent(bool isEnabled, bool multilin Assert.AreEqual(isEnabled ? 1 : 0, currentCount); } - [DataTestMethod, + [TestMethod, DataRow(true, false), DataRow(true, true), DataRow(false, false), @@ -208,7 +208,7 @@ public void BitTextFieldMustRespondToTheFocusEvent(bool isEnabled, bool multilin Assert.AreEqual(isEnabled ? 1 : 0, focusedOutValue); } - [DataTestMethod, + [TestMethod, DataRow(true, false, "u", "d"), DataRow(true, true, "u", "d"), DataRow(false, false, "u", "d"), @@ -235,7 +235,7 @@ public void BitTextFieldMustRespondToTheKeyEvent(bool isEnabled, bool multiline, Assert.AreEqual(isEnabled ? keyDownValue : null, keyDownedValue); } - [DataTestMethod, + [TestMethod, DataRow(true, false), DataRow(true, true), DataRow(false, false), @@ -258,7 +258,7 @@ public void BitTextFieldMustRespondToTheChangeEvent(bool isEnabled, bool multili Assert.AreEqual(isEnabled ? 1 : 0, currentCount); } - [DataTestMethod, DataRow("Prefix")] + [TestMethod, DataRow("Prefix")] public void BitTextFieldShowPrefix(string prefix) { var component = RenderComponent(parameters => @@ -270,7 +270,7 @@ public void BitTextFieldShowPrefix(string prefix) Assert.AreEqual(prefix, bitTextFieldPrefix.TextContent); } - [DataTestMethod, DataRow("Suffix")] + [TestMethod, DataRow("Suffix")] public void BitTextFieldShowSuffix(string suffix) { var component = RenderComponent(parameters => @@ -282,7 +282,7 @@ public void BitTextFieldShowSuffix(string suffix) Assert.AreEqual(suffix, bitTextFieldSuffix.TextContent); } - [DataTestMethod, + [TestMethod, DataRow(true, "hello world"), DataRow(false, "hello world"), ] @@ -299,7 +299,7 @@ public void BitTextFieldShouldTakeDefaultValue(bool multiline, string defaultVal Assert.AreEqual(defaultValue, bitTextField.GetAttribute("value")); } - [DataTestMethod, DataRow("test description")] + [TestMethod, DataRow("test description")] public void BitTextFieldShouldTakeDescription(string description) { var component = RenderComponent(parameters => @@ -311,7 +311,7 @@ public void BitTextFieldShouldTakeDescription(string description) Assert.AreEqual(description, bitTextFieldDescription.TextContent); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -326,7 +326,7 @@ public void BitTextFieldShouldRespectUnderLineStyle(bool underlined) Assert.AreEqual(underlined, bitTextField.ClassList.Contains("bit-tfl-und")); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -341,7 +341,7 @@ public void BitTextFieldShouldRespectHasBorderStyle(bool noBorder) Assert.AreEqual(noBorder, bitTextField.ClassList.Contains("bit-tfl-nbd")); } - [DataTestMethod, DataRow(5)] + [TestMethod, DataRow(5)] public void BitTextFieldShouldRespectRowsNumberWhenItIsMultiline(int rows) { var component = RenderComponent(parameters => @@ -354,7 +354,7 @@ public void BitTextFieldShouldRespectRowsNumberWhenItIsMultiline(int rows) Assert.AreEqual(rows.ToString(), input.GetAttribute("rows")); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -370,7 +370,7 @@ public void BitTextFieldShouldRespectIsResizableWhenItIsMultiline(bool resizable Assert.AreEqual(!resizable, bitTextField.ClassList.Contains("bit-tfl-mlf")); } - [DataTestMethod, + [TestMethod, DataRow("Detailed label", true), DataRow("Detailed label", false) ] @@ -389,7 +389,7 @@ public void BitTextFieldAriaLabelTest(string ariaLabel, bool multiline) Assert.AreEqual(input.GetAttribute("aria-label"), ariaLabel); } - [DataTestMethod, + [TestMethod, DataRow(true, "this is label"), DataRow(false, "this is label"), DataRow(true, null), @@ -407,7 +407,7 @@ public void BitTextFieldAriaLabelledbyTest(bool multiline, string label) Assert.AreEqual(label.HasValue(), input.HasAttribute("aria-labelledby")); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("off"), DataRow("email") @@ -433,7 +433,7 @@ public void BitTextFieldAutoCompleteTest(string autoComplete) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("abc123"), DataRow("test@bit-components.com"), @@ -472,7 +472,7 @@ public void BitTextFieldValidationFormTest(string value) Assert.AreEqual(component.Instance.ValidCount, component.Instance.InvalidCount); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("abc123"), DataRow("test@bit-components.com"), @@ -512,7 +512,7 @@ public void BitTextFieldValidationFormTestWhenItIsMultiline(string value) Assert.AreEqual(component.Instance.ValidCount, component.Instance.InvalidCount); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("abc123"), DataRow("test@bit-components.com"), @@ -552,7 +552,7 @@ public void BitTextFieldValidationInvalidHtmlAttributeTest(string value) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("abc123"), DataRow("test@bit-components.com"), @@ -593,7 +593,7 @@ public void BitTextFieldValidationInvalidHtmlAttributeTestWhenItIsMultiline(stri } } - [DataTestMethod, + [TestMethod, DataRow("abc123"), DataRow("test@bit.com") ] @@ -630,7 +630,7 @@ public void BitTextFieldValidationInvalidCssClassTest(string value) Assert.AreEqual(isInvalid is false, bitTextField.ClassList.Contains("bit-inv")); } - [DataTestMethod, + [TestMethod, DataRow(" bit"), DataRow("bit "), DataRow(" bit component "), @@ -650,7 +650,7 @@ public void BitTextFieldTrimmedDefaultValueTest(string value) Assert.AreEqual(value.Trim(), trimmedValue); } - [DataTestMethod, + [TestMethod, DataRow(" bit"), DataRow("bit "), DataRow(" bit component "), diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/TextField/BitTextFieldValidationTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/TextField/BitTextFieldValidationTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/TextField/BitTextFieldValidationTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/TextField/BitTextFieldValidationTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/TimePicker/BitTimePickerTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/TimePicker/BitTimePickerTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/TimePicker/BitTimePickerTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/TimePicker/BitTimePickerTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Toggle/BitToggleTestModel.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Toggle/BitToggleTestModel.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Toggle/BitToggleTestModel.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Toggle/BitToggleTestModel.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Toggle/BitToggleTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Toggle/BitToggleTests.cs similarity index 95% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Toggle/BitToggleTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Toggle/BitToggleTests.cs index f8b0a35ad9..3c31427d81 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Toggle/BitToggleTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Toggle/BitToggleTests.cs @@ -6,7 +6,7 @@ namespace Bit.BlazorUI.Tests.Components.Inputs.Toggle; [TestClass] public class BitToggleTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(true, true), DataRow(true, false), DataRow(false, true), @@ -41,7 +41,7 @@ public void BitToggleTest(bool isEnabled, bool value) } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -59,7 +59,7 @@ public void BitToggleInlineLabelShouldHaveClassName(bool isInlineLabel) } } - [DataTestMethod, DataRow("Detailed AriaLabel")] + [TestMethod, DataRow("Detailed AriaLabel")] public void BitToggleAriaLabelTest(string ariaLabel) { var com = RenderComponent(parameters => @@ -71,7 +71,7 @@ public void BitToggleAriaLabelTest(string ariaLabel) Assert.AreEqual(bitToggleButton.GetAttribute("aria-label"), ariaLabel); } - [DataTestMethod, + [TestMethod, DataRow(true, "on", "off", "This is the first defaultText", "This is the first label"), DataRow(false, "on", "off", "This is the second defaultText", "This is the second label"), DataRow(true, "on", "off", null, "This is the Third label"), @@ -114,7 +114,7 @@ public void BitToggleAriaLabelledbyTest(bool value, string onText, string offTex Assert.AreEqual(button?.GetAttribute("aria-labelledby"), ariaLabelledById); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -130,7 +130,7 @@ public void BitToggleAriaCheckedTest(bool value) Assert.AreEqual(bitToggleButton.GetAttribute("aria-checked"), ariaChecked); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("Foo"), DataRow("Bar") @@ -149,7 +149,7 @@ public void BitToggleRoleTest(string role) Assert.AreEqual(bitToggleButton.GetAttribute("role"), role ?? "switch"); } - [DataTestMethod, DataRow("This is label")] + [TestMethod, DataRow("This is label")] public void BitToggleLabel(string label) { var com = RenderComponent(parameters => @@ -161,7 +161,7 @@ public void BitToggleLabel(string label) Assert.AreEqual(bitToggleLabel.TextContent, label); } - [DataTestMethod, DataRow("
This is labelTemplate
")] + [TestMethod, DataRow("
This is labelTemplate
")] public void BitToggleMarkupLabelTest(string labelTemplate) { var com = RenderComponent(parameters => @@ -173,7 +173,7 @@ public void BitToggleMarkupLabelTest(string labelTemplate) bitToggleLabelChild.MarkupMatches(labelTemplate); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -200,7 +200,7 @@ public void BitToggleValidationFormTest(bool value) Assert.AreEqual(com.Instance.ValidCount, com.Instance.InvalidCount); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -230,7 +230,7 @@ public void BitToggleValidationInvalidHtmlAttributeTest(bool value) Assert.AreEqual(value is false, checkBox.HasAttribute("aria-invalid")); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Toggle/BitToggleValidationTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Toggle/BitToggleValidationTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Inputs/Toggle/BitToggleValidationTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Inputs/Toggle/BitToggleValidationTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Footer/BitFooterHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Footer/BitFooterHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Footer/BitFooterHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Footer/BitFooterHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Footer/BitFooterTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Footer/BitFooterTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Footer/BitFooterTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Footer/BitFooterTests.cs index f2bc379074..0ad89f5c5d 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Footer/BitFooterTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Footer/BitFooterTests.cs @@ -18,7 +18,7 @@ public void BitFooterShouldRenderExpectedElement() "); } - [DataTestMethod] + [TestMethod] [DataRow("
Footer Content
")] [DataRow("I'm a Footer")] public void BitFooterShouldRespectChildContent(string childContent) @@ -36,7 +36,7 @@ public void BitFooterShouldRespectChildContent(string childContent) "); } - [DataTestMethod] + [TestMethod] [DataRow(40)] [DataRow(100)] public void BitFooterShouldRespectHeight(int height) @@ -66,7 +66,7 @@ public void BitFooterShouldRespectFixed() Assert.IsTrue(footer.ClassList.Contains("bit-ftr-fix")); } - [DataTestMethod] + [TestMethod] [DataRow("margin: 10px;")] [DataRow(null)] public void BitFooterShouldRespectStyle(string style) @@ -94,7 +94,7 @@ public void BitFooterShouldRespectStyle(string style) } } - [DataTestMethod] + [TestMethod] [DataRow("footer-class")] [DataRow(null)] public void BitFooterShouldRespectClass(string @class) @@ -113,7 +113,7 @@ public void BitFooterShouldRespectClass(string @class) "); } - [DataTestMethod] + [TestMethod] [DataRow("footer-id")] [DataRow(null)] public void BitFooterShouldRespectId(string id) @@ -132,7 +132,7 @@ public void BitFooterShouldRespectId(string id) "); } - [DataTestMethod] + [TestMethod] [DataRow(BitDir.Rtl)] [DataRow(BitDir.Ltr)] [DataRow(BitDir.Auto)] diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Grid/BitGridTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Grid/BitGridTests.cs similarity index 99% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Grid/BitGridTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Grid/BitGridTests.cs index bdfdc47e59..f8b6ad719f 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Grid/BitGridTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Grid/BitGridTests.cs @@ -39,7 +39,7 @@ public void BitGridShouldSetCssVariablesForSpanAndColumns() Assert.IsTrue(style.Contains("--columns:8")); } - [DataTestMethod] + [TestMethod] [DataRow(BitAlignment.Start, "flex-start")] [DataRow(BitAlignment.End, "flex-end")] [DataRow(BitAlignment.Center, "center")] diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Header/BitHeaderHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Header/BitHeaderHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Header/BitHeaderHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Header/BitHeaderHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Header/BitHeaderTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Header/BitHeaderTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Header/BitHeaderTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Header/BitHeaderTests.cs index ef7fbe005d..fdd1976ece 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Header/BitHeaderTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Header/BitHeaderTests.cs @@ -18,7 +18,7 @@ public void BitHeaderShouldRenderExpectedElement() "); } - [DataTestMethod] + [TestMethod] [DataRow("
Title
")] [DataRow("I'm a Header")] public void BitHeaderShouldRespectChildContent(string childContent) @@ -36,7 +36,7 @@ public void BitHeaderShouldRespectChildContent(string childContent) "); } - [DataTestMethod] + [TestMethod] [DataRow(50)] [DataRow(120)] public void BitHeaderShouldRespectHeight(int height) @@ -66,7 +66,7 @@ public void BitHeaderShouldRespectFixed() Assert.IsTrue(header.ClassList.Contains("bit-hdr-fix")); } - [DataTestMethod] + [TestMethod] [DataRow("padding: 1rem;")] [DataRow(null)] public void BitHeaderShouldRespectStyle(string style) @@ -94,7 +94,7 @@ public void BitHeaderShouldRespectStyle(string style) } } - [DataTestMethod] + [TestMethod] [DataRow("test-class")] [DataRow(null)] public void BitHeaderShouldRespectClass(string @class) @@ -113,7 +113,7 @@ public void BitHeaderShouldRespectClass(string @class) "); } - [DataTestMethod] + [TestMethod] [DataRow("test-id")] [DataRow(null)] public void BitHeaderShouldRespectId(string id) @@ -132,7 +132,7 @@ public void BitHeaderShouldRespectId(string id) "); } - [DataTestMethod] + [TestMethod] [DataRow(BitDir.Rtl)] [DataRow(BitDir.Ltr)] [DataRow(BitDir.Auto)] diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Layout/BitLayoutTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Layout/BitLayoutTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Layout/BitLayoutTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Layout/BitLayoutTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Spacer/BitSpacerHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Spacer/BitSpacerHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Spacer/BitSpacerHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Spacer/BitSpacerHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Spacer/BitSpacerTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Spacer/BitSpacerTests.cs similarity index 98% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Spacer/BitSpacerTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Spacer/BitSpacerTests.cs index 22692ed899..88b20fed77 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Layouts/Spacer/BitSpacerTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Layouts/Spacer/BitSpacerTests.cs @@ -28,7 +28,7 @@ public void BitSpacerShouldGrowWhenWidthIsNull() Assert.IsTrue(style.Contains("flex-grow:1")); } - [DataTestMethod] + [TestMethod] [DataRow(0)] [DataRow(10)] [DataRow(64)] diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/BasicList/BitBasicListTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/BasicList/BitBasicListTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/BasicList/BitBasicListTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/BasicList/BitBasicListTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/BasicList/BitBasicListTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/BasicList/BitBasicListTests.cs similarity index 98% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/BasicList/BitBasicListTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/BasicList/BitBasicListTests.cs index 695083e84f..d4f28a96ef 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/BasicList/BitBasicListTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/BasicList/BitBasicListTests.cs @@ -8,7 +8,7 @@ namespace Bit.BlazorUI.Tests.Components.Lists.BasicList; [TestClass] public class BitBasicListTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(true, 3_000_000, null), DataRow(true, 3_000_000, 5), DataRow(true, null, 5), @@ -77,7 +77,7 @@ public void BitBasicListShouldRenderExpectedChildElements(bool virtualize, int? AppContext.SetData("Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.MaxItemCount", null); } - [DataTestMethod, + [TestMethod, DataRow(100, "AssignedRole"), DataRow(100, null) ] @@ -99,7 +99,7 @@ public void BitBasicListShouldHaveCorrectRole(int itemCount, string role) Assert.AreEqual(role.HasValue() ? role : "list", listRole); } - [DataTestMethod, DataRow(100)] + [TestMethod, DataRow(100)] public void BitBasicListShouldHaveCorrectClass(int itemCount) { var component = RenderComponent(parameters => diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/BasicList/PersonTestModel.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/BasicList/PersonTestModel.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/BasicList/PersonTestModel.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/BasicList/PersonTestModel.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/Carousel/BitCarouselTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/Carousel/BitCarouselTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/Carousel/BitCarouselTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/Carousel/BitCarouselTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/Carousel/BitCarouselTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/Carousel/BitCarouselTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/Carousel/BitCarouselTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/Carousel/BitCarouselTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/Swiper/BitSwiperTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/Swiper/BitSwiperTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/Swiper/BitSwiperTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/Swiper/BitSwiperTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/Swiper/BitSwiperTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/Swiper/BitSwiperTests.cs similarity index 99% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/Swiper/BitSwiperTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/Swiper/BitSwiperTests.cs index bf99a8f11c..a7b1c37a27 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/Swiper/BitSwiperTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/Swiper/BitSwiperTests.cs @@ -19,7 +19,7 @@ public void BitSwiperShouldHideNavigationWhenRequested() Assert.AreEqual(0, component.FindAll(".bit-swp-rbt").Count); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false)] public void BitSwiperShouldRespectIsEnabled(bool isEnabled) diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/Timeline/BitTimelineTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/Timeline/BitTimelineTests.cs similarity index 99% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/Timeline/BitTimelineTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/Timeline/BitTimelineTests.cs index fddc820968..6bda773a6c 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Lists/Timeline/BitTimelineTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Lists/Timeline/BitTimelineTests.cs @@ -33,7 +33,7 @@ public void BitTimelineShouldRenderItemsFromChildContent() Assert.IsTrue(component.Markup.Contains("Second")); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false)] public void BitTimelineShouldRespectIsEnabled(bool isEnabled) diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/Breadcrumb/BitBreadcrumbTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/Breadcrumb/BitBreadcrumbTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/Breadcrumb/BitBreadcrumbTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/Breadcrumb/BitBreadcrumbTests.cs index 82f3f76bad..3c123ded20 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/Breadcrumb/BitBreadcrumbTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/Breadcrumb/BitBreadcrumbTests.cs @@ -7,7 +7,7 @@ namespace Bit.BlazorUI.Tests.Components.Navs.Breadcrumb; [TestClass] public class BitBreadcrumbTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow("Separator") ] public void BitBreadcrumbShouldTakeDividerIcon(string icon) @@ -23,7 +23,7 @@ public void BitBreadcrumbShouldTakeDividerIcon(string icon) Assert.IsTrue(breadcrumbDividerIcon.ClassList.Contains($"bit-icon--{icon}")); } - [DataTestMethod, + [TestMethod, DataRow((uint)0), DataRow((uint)3) ] @@ -49,7 +49,7 @@ public void BitBreadcrumbShouldRespectMaxDisplayItems(uint maxDisplayedItems) } } - [DataTestMethod, + [TestMethod, DataRow("ChevronDown", (uint)2, (uint)0), DataRow("ChevronDown", (uint)3, (uint)1) ] @@ -73,7 +73,7 @@ public void BitBreadcrumbShouldRespectOverflowChanges(string icon, uint maxDispl Assert.AreEqual((uint)breadcrumbElements.Count, maxDisplayedItems); } - [DataTestMethod] + [TestMethod] public void BitBreadcrumbShouldTakeCorrectAriaCurrent() { var breadcrumbItems = GetBreadcrumbItems(); @@ -90,7 +90,7 @@ public void BitBreadcrumbShouldTakeCorrectAriaCurrent() Assert.IsTrue(breadcrumbElements?[lastIndex]?.GetAttribute("aria-current")?.Contains("page")); } - [DataTestMethod, + [TestMethod, DataRow("Detailed label", (uint)3) ] public void BitBreadcrumbShouldTakeOverflowAriaLabel(string overflowAriaLabel, uint maxDisplayedItems) @@ -109,7 +109,7 @@ public void BitBreadcrumbShouldTakeOverflowAriaLabel(string overflowAriaLabel, u Assert.IsTrue(breadcrumbButton?.GetAttribute("aria-label")?.Contains(overflowAriaLabel)); } - [DataTestMethod, + [TestMethod, DataRow("color:red;") ] public void BitBreadcrumbShouldTakeCustomStyle(string customStyle) @@ -125,7 +125,7 @@ public void BitBreadcrumbShouldTakeCustomStyle(string customStyle) Assert.IsTrue(breadcrumb?.GetAttribute("style")?.Contains(customStyle)); } - [DataTestMethod, + [TestMethod, DataRow("custom-class") ] public void BitBreadcrumbShouldTakeCustomClass(string customClass) @@ -141,7 +141,7 @@ public void BitBreadcrumbShouldTakeCustomClass(string customClass) Assert.IsTrue(breadcrumb.ClassList.Contains($"{customClass}")); } - [DataTestMethod, + [TestMethod, DataRow(BitVisibility.Visible), DataRow(BitVisibility.Hidden), DataRow(BitVisibility.Collapsed), diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/DropMenu/BitDropMenuHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/DropMenu/BitDropMenuHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/DropMenu/BitDropMenuHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/DropMenu/BitDropMenuHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/DropMenu/BitDropMenuTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/DropMenu/BitDropMenuTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/DropMenu/BitDropMenuTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/DropMenu/BitDropMenuTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/Nav/BitNavTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/Nav/BitNavTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/Nav/BitNavTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/Nav/BitNavTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/Nav/BitNavTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/Nav/BitNavTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/Nav/BitNavTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/Nav/BitNavTests.cs index 62d9d8f181..08caf0bc32 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/Nav/BitNavTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/Nav/BitNavTests.cs @@ -7,7 +7,7 @@ namespace Bit.BlazorUI.Tests.Components.Navs.Nav; [TestClass] public class BitNavTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(false, true), DataRow(false, false), DataRow(true, true), @@ -41,7 +41,7 @@ public void BitNavLinkItemMainClassTest(bool isEnabled, bool hasUrl) } } - [DataTestMethod, DataRow("Detailed label")] + [TestMethod, DataRow("Detailed label")] public void BitNavAriaLabelTest(string ariaLabel) { var component = RenderComponent(parameters => @@ -54,7 +54,7 @@ public void BitNavAriaLabelTest(string ariaLabel) Assert.IsTrue(bitNav?.GetAttribute("aria-label")?.Equals(ariaLabel)); } - [DataTestMethod, + [TestMethod, DataRow("collapseAriaLabel", "expandAriaLabel", false), DataRow("collapseAriaLabel", "expandAriaLabel", true) ] @@ -87,7 +87,7 @@ public void BitNavLinkItemAriaLabelTest(string collapseAriaLabel, string expandA Assert.AreEqual(expectedResult, button.GetAttribute("aria-label")); } - [DataTestMethod, + [TestMethod, DataRow(BitNavRenderType.Grouped), DataRow(BitNavRenderType.Normal) ] @@ -110,7 +110,7 @@ public void BitNavShouldRespectGroupItems(BitNavRenderType type) } } - [DataTestMethod, + [TestMethod, DataRow(0), DataRow(1), DataRow(2), @@ -133,7 +133,7 @@ public void BitNavSelectedItemTest(int selectedItemIndex) //Assert.AreEqual(expectedResult, selectedItemTxt.TextContent); } - [DataTestMethod] + [TestMethod] public void BitNavOnLinkExpandClickTest() { var items = new List() @@ -153,7 +153,7 @@ public void BitNavOnLinkExpandClickTest() //Assert.AreEqual(items[0].Key, componenet.Instance.OnLinkExpandClickValue); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -184,7 +184,7 @@ public void BitNavLinkItemForceAnchorTest(bool isForced) } } - [DataTestMethod, + [TestMethod, DataRow(null, "name"), DataRow("", "name"), DataRow("title", "name") diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/NavBar/BitNavBarHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/NavBar/BitNavBarHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/NavBar/BitNavBarHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/NavBar/BitNavBarHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/NavBar/BitNavBarTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/NavBar/BitNavBarTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/NavBar/BitNavBarTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/NavBar/BitNavBarTests.cs index 31631d20e9..dd3c63ca99 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/NavBar/BitNavBarTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/NavBar/BitNavBarTests.cs @@ -16,7 +16,7 @@ public void BitNavBarShouldRenderRootElement() Assert.IsNotNull(root); } - [DataTestMethod] + [TestMethod] [DataRow(true, "bit-nbr-ftw")] [DataRow(false, "")] public void BitNavBarShouldRespectFitWidth(bool fitWidth, string expectedClass) @@ -38,7 +38,7 @@ public void BitNavBarShouldRespectFitWidth(bool fitWidth, string expectedClass) } } - [DataTestMethod] + [TestMethod] [DataRow(true, "bit-nbr-flw")] [DataRow(false, "")] public void BitNavBarShouldRespectFullWidth(bool fullWidth, string expectedClass) @@ -60,7 +60,7 @@ public void BitNavBarShouldRespectFullWidth(bool fullWidth, string expectedClass } } - [DataTestMethod] + [TestMethod] [DataRow(true, "bit-nbr-ion")] [DataRow(false, "")] public void BitNavBarShouldRespectIconOnly(bool iconOnly, string expectedClass) @@ -82,7 +82,7 @@ public void BitNavBarShouldRespectIconOnly(bool iconOnly, string expectedClass) } } - [DataTestMethod] + [TestMethod] [DataRow(BitColor.Primary, "bit-nbr-pri")] [DataRow(BitColor.Secondary, "bit-nbr-sec")] [DataRow(null, "bit-nbr-pri")] diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/Pagination/BitPaginationTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/Pagination/BitPaginationTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/Pagination/BitPaginationTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/Pagination/BitPaginationTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/Pivot/BitPivotTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/Pivot/BitPivotTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/Pivot/BitPivotTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/Pivot/BitPivotTests.cs index c533d466be..b14a64e516 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Navs/Pivot/BitPivotTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Navs/Pivot/BitPivotTests.cs @@ -6,7 +6,7 @@ namespace Bit.BlazorUI.Tests.Components.Navs.Pivot; [TestClass] public class BitPivotTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(BitPivotHeaderType.Link, BitSize.Large, BitPivotOverflowBehavior.None), DataRow(BitPivotHeaderType.Tab, BitSize.Medium, BitPivotOverflowBehavior.Scroll), DataRow(BitPivotHeaderType.Tab, BitSize.Small, BitPivotOverflowBehavior.Menu) @@ -32,7 +32,7 @@ public void BitPivotShouldRespectParameterRelatedCssClasses(BitPivotHeaderType h } [Ignore("bypassed - BUnit 2-way bound parameters issue")] - [DataTestMethod, + [TestMethod, DataRow(false, false), DataRow(true, true) ] @@ -51,7 +51,7 @@ public void BitPivotShouldRespectSelectKey(bool isEnabled, bool expectedResult) Assert.AreEqual(component.FindAll(".bit-pvt > div:first-child > div")[1].ClassList.Contains("bit-pvti-sel"), expectedResult); } - [DataTestMethod, DataRow("Detailed label")] + [TestMethod, DataRow("Detailed label")] public void BitPivotAriaLabelTest(string ariaLabel) { var com = RenderComponent(parameters => @@ -68,7 +68,7 @@ public void BitPivotAriaLabelTest(string ariaLabel) } } - [DataTestMethod, + [TestMethod, DataRow(BitPivotPosition.Top), DataRow(BitPivotPosition.Bottom), DataRow(BitPivotPosition.Start), diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Notifications/Badge/BitBadgeTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Notifications/Badge/BitBadgeTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Notifications/Badge/BitBadgeTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Notifications/Badge/BitBadgeTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Notifications/Message/BitMessageTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Notifications/Message/BitMessageTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Notifications/Message/BitMessageTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Notifications/Message/BitMessageTests.cs index 40b516531c..a1b2cfe431 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Notifications/Message/BitMessageTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Notifications/Message/BitMessageTests.cs @@ -7,7 +7,7 @@ namespace Bit.BlazorUI.Tests.Components.Notifications.Message; [TestClass] public class BitMessageTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(BitColor.Info), DataRow(BitColor.Error), DataRow(BitColor.SevereWarning), @@ -49,7 +49,7 @@ public void BitMessageShouldTakeCorrectType(BitColor type) Assert.IsTrue(icon.ClassList.Contains($"bit-icon--{iconMap[type]}")); } - [DataTestMethod, + [TestMethod, DataRow("Emoji2"), DataRow("WordLogo") ] @@ -64,7 +64,7 @@ public void BitMessageShouldRespectCustomIcon(string iconName) Assert.IsTrue(icon.ClassList.Contains($"bit-icon--{iconName}")); } - [DataTestMethod] + [TestMethod] public void BitMessageDismissButtonShouldWorkCorrect() { var currentCount = 0; @@ -80,7 +80,7 @@ public void BitMessageDismissButtonShouldWorkCorrect() Assert.AreEqual(1, currentCount); } - [DataTestMethod, + [TestMethod, DataRow("Emoji2"), DataRow("WordLogo") ] @@ -97,7 +97,7 @@ public void BitMessageShouldRespectCustomDismissIcon(string iconName) Assert.IsTrue(icon.ClassList.Contains($"bit-icon--{iconName}")); } - [DataTestMethod, + [TestMethod, DataRow("
") ] public void BitMessageShouldRespectAction(string actions) @@ -111,7 +111,7 @@ public void BitMessageShouldRespectAction(string actions) actionsTemplate.MarkupMatches(actions); } - [DataTestMethod, + [TestMethod, DataRow("alert", BitColor.Info), DataRow("alert", BitColor.Success), DataRow("alert", BitColor.Warning), diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Notifications/Persona/BitPersonaTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Notifications/Persona/BitPersonaTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Notifications/Persona/BitPersonaTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Notifications/Persona/BitPersonaTests.cs index ec333f26be..4f1a966051 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Notifications/Persona/BitPersonaTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Notifications/Persona/BitPersonaTests.cs @@ -6,7 +6,7 @@ namespace Bit.BlazorUI.Tests.Components.Notifications.Persona; [TestClass] public class BitPersonaTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -29,7 +29,7 @@ public void BitPersonaTest(bool isEnabled) } } - [DataTestMethod, + [TestMethod, DataRow("PrimaryText", "SecondaryText", "TertiaryText", "OptionalText"), DataRow(null, null, null, null) ] @@ -54,7 +54,7 @@ public void BitPersonaShouldAddCorrectDetailsText(string primaryText, string sec Assert.AreEqual(optionalText, optionalTextEl.TextContent.HasValue() ? optionalTextEl.TextContent : null); } - [DataTestMethod, + [TestMethod, DataRow(BitPersonaSize.Size8), DataRow(BitPersonaSize.Size32), DataRow(BitPersonaSize.Size40), @@ -77,7 +77,7 @@ public void BitPersonaSizeClassNameTest(BitPersonaSize size) Assert.IsTrue(persona.ClassList.Contains(personaSizeClass)); } - [DataTestMethod, + [TestMethod, DataRow("Image url"), DataRow(null) ] @@ -97,7 +97,7 @@ public void BitPersonaImageTest(string imageUrl) } } - [DataTestMethod, + [TestMethod, DataRow("Presence Title", BitPersonaPresence.Blocked), DataRow("Presence Title", BitPersonaPresence.Away), DataRow("Presence Title", BitPersonaPresence.Offline), diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Notifications/SnackBar/BitSnackBarTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Notifications/SnackBar/BitSnackBarTests.cs similarity index 83% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Notifications/SnackBar/BitSnackBarTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Notifications/SnackBar/BitSnackBarTests.cs index dcf1c50b01..e54fda10de 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Notifications/SnackBar/BitSnackBarTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Notifications/SnackBar/BitSnackBarTests.cs @@ -10,16 +10,15 @@ namespace Bit.BlazorUI.Tests.Components.Notifications.SnackBar; [TestClass] public class BitSnackBarTests : BunitTestContext { - [DataTestMethod, - DataRow(BitSnackBarPosition.TopStart), - DataRow(BitSnackBarPosition.TopCenter), - DataRow(BitSnackBarPosition.TopEnd), - DataRow(BitSnackBarPosition.BottomStart), - DataRow(BitSnackBarPosition.BottomCenter), - DataRow(BitSnackBarPosition.BottomEnd), - DataRow(null) + [TestMethod, + DataRow(BitSnackBarPosition.TopStart), + DataRow(BitSnackBarPosition.TopCenter), + DataRow(BitSnackBarPosition.TopEnd), + DataRow(BitSnackBarPosition.BottomStart), + DataRow(BitSnackBarPosition.BottomCenter), + DataRow(BitSnackBarPosition.BottomEnd), + DataRow(null) ] - [TestMethod] public void BitSnackBarPositionTest(BitSnackBarPosition? position) { var com = RenderComponent(parameters => @@ -43,11 +42,10 @@ public void BitSnackBarPositionTest(BitSnackBarPosition? position) Assert.IsTrue(element.ClassList.Contains(positionClass)); } - [DataTestMethod, - DataRow("title", "body"), - DataRow("title", "") + [TestMethod, + DataRow("title", "body"), + DataRow("title", "") ] - [TestMethod] public async Task BitSnackBarShowTest(string title, string body) { var com = RenderComponent(); @@ -67,11 +65,10 @@ public async Task BitSnackBarShowTest(string title, string body) } } - [DataTestMethod, - DataRow(true), - DataRow(false) + [TestMethod, + DataRow(true), + DataRow(false) ] - [TestMethod] public async Task BitSnackBarAutoDismissTest(bool autoDismiss) { var com = RenderComponent( @@ -91,15 +88,14 @@ public async Task BitSnackBarAutoDismissTest(bool autoDismiss) Assert.AreEqual(autoDismiss ? 0 : 1, items.Count); } - [DataTestMethod, - DataRow("title", BitColor.Info), - DataRow("title", BitColor.Warning), - DataRow("title", BitColor.Success), - DataRow("title", BitColor.Error), - DataRow("title", BitColor.SevereWarning), - DataRow("title", null) + [TestMethod, + DataRow("title", BitColor.Info), + DataRow("title", BitColor.Warning), + DataRow("title", BitColor.Success), + DataRow("title", BitColor.Error), + DataRow("title", BitColor.SevereWarning), + DataRow("title", null) ] - [TestMethod] public async Task BitColorTest(string title, BitColor? color) { var com = RenderComponent(); @@ -135,10 +131,9 @@ public async Task BitColorTest(string title, BitColor? color) } } - [DataTestMethod, - DataRow("title") + [TestMethod, + DataRow("title") ] - [TestMethod] public async Task BitSnackBarCloseButtonTest(string title) { var com = RenderComponent(); @@ -156,11 +151,10 @@ public async Task BitSnackBarCloseButtonTest(string title) Assert.AreEqual(0, itemsAfterClose.Count); } - [DataTestMethod, - DataRow("title", "Go"), - DataRow("title", "Cancel") + [TestMethod, + DataRow("title", "Go"), + DataRow("title", "Cancel") ] - [TestMethod] public async Task BitSnackBarDismissIconNameTest(string title, string iconName) { var com = RenderComponent( @@ -177,10 +171,9 @@ public async Task BitSnackBarDismissIconNameTest(string title, string iconName) Assert.IsTrue(closeButtonIcon.ClassList.Contains($"bit-icon--{iconName}")); } - [DataTestMethod, - DataRow("title") + [TestMethod, + DataRow("title") ] - [TestMethod] public async Task BitSnackBarTitleTemplateTest(string title) { RenderFragment titleTemplate = (text) => (builder) => @@ -201,10 +194,9 @@ public async Task BitSnackBarTitleTemplateTest(string title) titleTemplateElement.InnerHtml.MarkupMatches(expectedHtml); } - [DataTestMethod, - DataRow("title", "body") + [TestMethod, + DataRow("title", "body") ] - [TestMethod] public async Task BitSnackBarBodyTemplateTest(string title, string body) { RenderFragment bodyTemplate = (text) => (builder) => diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Notifications/Tag/BitTagTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Notifications/Tag/BitTagTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Notifications/Tag/BitTagTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Notifications/Tag/BitTagTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitBarsLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitBarsLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitBarsLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitBarsLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitBouncingDotsLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitBouncingDotsLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitBouncingDotsLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitBouncingDotsLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitCircleLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitCircleLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitCircleLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitCircleLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitDotsRingLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitDotsRingLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitDotsRingLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitDotsRingLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitDualRingLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitDualRingLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitDualRingLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitDualRingLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitEllipsisLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitEllipsisLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitEllipsisLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitEllipsisLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitGridLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitGridLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitGridLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitGridLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitHeartLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitHeartLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitHeartLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitHeartLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitHourglassLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitHourglassLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitHourglassLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitHourglassLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitOrbitingDotsLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitOrbitingDotsLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitOrbitingDotsLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitOrbitingDotsLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRingLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRingLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRingLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRingLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRippleLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRippleLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRippleLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRippleLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRollerLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRollerLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRollerLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRollerLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRollingDashesLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRollingDashesLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRollingDashesLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRollingDashesLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRollingSquareLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRollingSquareLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRollingSquareLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitRollingSquareLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitSlickBarsLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitSlickBarsLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitSlickBarsLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitSlickBarsLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitSpinnerLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitSpinnerLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitSpinnerLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitSpinnerLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitXboxLoadingTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitXboxLoadingTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Loading/BitXboxLoadingTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Loading/BitXboxLoadingTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/ProgressBar/BitProgressTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/ProgressBar/BitProgressTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/ProgressBar/BitProgressTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/ProgressBar/BitProgressTests.cs index 6d330ee19a..02dee8423c 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/ProgressBar/BitProgressTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/ProgressBar/BitProgressTests.cs @@ -6,7 +6,7 @@ namespace Bit.BlazorUI.Tests.Components.Progress.Progress; [TestClass] public class BitProgressTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(3), DataRow(12) ] @@ -23,7 +23,7 @@ public void BitProgressThicknessTest(int thickness) Assert.IsTrue(piWrapperStyle?.Contains(expectedValue)); } - [DataTestMethod, + [TestMethod, DataRow(52), DataRow(43) ] @@ -40,7 +40,7 @@ public void BitProgressWidthShouldBeEqualPercent(double percent) Assert.IsTrue(piBarStyle?.Contains(expectedValue)); } - [DataTestMethod, + [TestMethod, DataRow(520), DataRow(430) ] @@ -57,7 +57,7 @@ public void BitProgressWidthCanNotBeBiggerThan100(double percent) Assert.IsTrue(piBarStyle?.Contains(expectedValue)); } - [DataTestMethod, + [TestMethod, DataRow(-5), DataRow(-265) ] @@ -75,7 +75,7 @@ public void BitProgressWidthCanNotBeSmallerThan0(double percent) } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -90,7 +90,7 @@ public void BitProgressIndeterminateClassTest(bool indeterminate) Assert.AreEqual(indeterminate, pin.ClassList.Contains("bit-prb-ind")); } - [DataTestMethod, + [TestMethod, DataRow("Label"), DataRow(null), ] @@ -115,7 +115,7 @@ public void BitProgressLabelTest(string label) } } - [DataTestMethod, + [TestMethod, DataRow("Description"), DataRow(null), ] @@ -140,7 +140,7 @@ public void BitProgressDescriptionTest(string description) } } - [DataTestMethod, + [TestMethod, DataRow("Aria Value Text"), DataRow(null), ] @@ -162,7 +162,7 @@ public void BitProgressAriaValueTextTest(string txt) } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false)] public void BitProgressShowPercentNumberTest(bool showPercentNumber) @@ -184,7 +184,7 @@ public void BitProgressShowPercentNumberTest(bool showPercentNumber) } } - [DataTestMethod, + [TestMethod, DataRow("

this is a custom label

") ] public void BitProgressLabelTemplateTest(string labelTemplate) @@ -198,7 +198,7 @@ public void BitProgressLabelTemplateTest(string labelTemplate) labelChildNodes?.MarkupMatches(labelTemplate); } - [DataTestMethod, + [TestMethod, DataRow("

this is a custom description

"), ] public void BitProgressDescriptionTemplateTest(string descriptionTemplate) diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Shimmer/BitShimmerHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Shimmer/BitShimmerHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Shimmer/BitShimmerHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Shimmer/BitShimmerHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Shimmer/BitShimmerTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Shimmer/BitShimmerTests.cs similarity index 98% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Shimmer/BitShimmerTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Shimmer/BitShimmerTests.cs index 27ddac4717..a58d070142 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Progress/Shimmer/BitShimmerTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Progress/Shimmer/BitShimmerTests.cs @@ -26,7 +26,7 @@ public void BitShimmerShouldRespectCircleParameter() Assert.IsTrue(compCircle.Find(".bit-smr").ClassList.Contains("bit-smr-crl")); } - [DataTestMethod] + [TestMethod] [DataRow("5rem", null)] [DataRow(null, "10rem")] [DataRow("3rem", "8rem")] @@ -52,7 +52,7 @@ public void BitShimmerShouldRespectSize(string height, string width) } } - [DataTestMethod] + [TestMethod] [DataRow(BitColor.Primary, "bit-smr-pri")] [DataRow(BitColor.Secondary, "bit-smr-sec")] [DataRow(null, "bit-smr-tbg")] diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Accordion/BitAccordionTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Accordion/BitAccordionTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Accordion/BitAccordionTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Accordion/BitAccordionTests.cs index 98286001e3..7ee5a9405d 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Accordion/BitAccordionTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Accordion/BitAccordionTests.cs @@ -6,7 +6,7 @@ namespace Bit.BlazorUI.Tests.Components.Surfaces.Accordion; [TestClass] public class BitAccordionTests : BunitTestContext { - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false), ] @@ -29,7 +29,7 @@ public void BitAccordionIsEnabledTest(bool isEnabled) } } - [DataTestMethod] + [TestMethod] public void BitAccordionShouldBeSetTitleAndDescriptionAndText() { var title = "title-value"; @@ -52,7 +52,7 @@ public void BitAccordionShouldBeSetTitleAndDescriptionAndText() Assert.AreEqual(bitAccordionText.TextContent, text); } - [DataTestMethod] + [TestMethod] public void BitAccordionShouldBeExpandWhenClicked() { var com = RenderComponent(); @@ -69,7 +69,7 @@ public void BitAccordionShouldBeExpandWhenClicked() } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -87,7 +87,7 @@ public void BitAccordionShouldBeSetDefaultIsExpanded(bool defaultIsExpanded) Assert.AreEqual(defaultIsExpanded, content?.ClassName?.Contains("bit-acd-cex")); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -109,7 +109,7 @@ public void BitAccordionShouldBeOnClickAndOnChange(bool isClick) Assert.AreEqual(isClick, isChanged); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -130,7 +130,7 @@ public void BitAccordionShouldBeSetHeaderTemplate(bool defaultIsExpanded) Assert.AreEqual(!defaultIsExpanded, header.InnerHtml.Equals(collapsedHeaderHtml)); } - [DataTestMethod] + [TestMethod] public void BitAccordionShouldBeSetContentTemplate() { var contentHtml = "

ContentTemplate

"; diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Callout/BitCalloutTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Callout/BitCalloutTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Callout/BitCalloutTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Callout/BitCalloutTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Card/BitCardTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Card/BitCardTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Card/BitCardTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Card/BitCardTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Collapse/BitCollapseTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Collapse/BitCollapseTests.cs similarity index 99% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Collapse/BitCollapseTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Collapse/BitCollapseTests.cs index 40f2982c8f..029b865f35 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Collapse/BitCollapseTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Collapse/BitCollapseTests.cs @@ -19,7 +19,7 @@ public void BitCollapseShouldRenderChildContent() Assert.IsTrue(collapse.ToMarkup().Contains("Hello Collapse")); } - [DataTestMethod] + [TestMethod] [DataRow(true)] [DataRow(false)] public void BitCollapseExpandedStateShouldApplyCorrectClasses(bool expanded) diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Dialog/BitDialogTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Dialog/BitDialogTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Dialog/BitDialogTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Dialog/BitDialogTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Modal/BitModalTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Modal/BitModalTests.cs similarity index 97% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Modal/BitModalTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Modal/BitModalTests.cs index edc89fb1b0..ea2279fc86 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Modal/BitModalTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Modal/BitModalTests.cs @@ -8,7 +8,7 @@ public class BitModalTests : BunitTestContext { private bool isModalOpen = true; - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(false), DataRow(true) @@ -25,7 +25,7 @@ public void BitModalIsAlertTest(bool? isAlert) Assert.AreEqual(element?.Attributes?["role"]?.Value, isAlert.HasValue && isAlert.Value ? "alertdialog" : "dialog"); } - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -48,7 +48,7 @@ public void BitModalIsBlockingTest(bool isBlocking) Assert.AreEqual(isBlocking ? 1 : 0, bitModal.Count); } - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -67,7 +67,7 @@ public void BitModalIsModelessTest(bool isModeless) Assert.AreEqual(isModeless ? 0 : 1, elementOverlay.Count); } - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -82,7 +82,7 @@ public void BitModalIsOpenTest(bool isOpen) Assert.AreEqual(isOpen ? 1 : 0, bitModel.Count); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(""), DataRow("Test-S-A-Id") @@ -111,7 +111,7 @@ public void BitModalSubtitleAriaIdTest(string subtitleAriaId) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(""), DataRow("Test-T-A-Id") @@ -192,7 +192,7 @@ public void BitModalOnDismissShouldWorkCorrect() Assert.AreEqual(1, currentCount); } - [DataTestMethod, + [TestMethod, DataRow(BitPosition.Center), DataRow(BitPosition.TopLeft), DataRow(BitPosition.TopCenter), diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Panel/BitPanelTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Panel/BitPanelTests.cs similarity index 98% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Panel/BitPanelTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Panel/BitPanelTests.cs index 5477856812..4499584955 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Panel/BitPanelTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Panel/BitPanelTests.cs @@ -9,7 +9,7 @@ public class BitPanelTests : BunitTestContext { private bool isPanelOpen = true; - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -39,7 +39,7 @@ public void BitPanelBlockingTest(bool blocking) } } - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -55,7 +55,7 @@ public void BitPanelModelessTest(bool modeless) Assert.AreEqual(modeless ? 0 : 1, elementOverlay.Count); } - [DataTestMethod, + [TestMethod, DataRow(false), DataRow(true) ] @@ -122,7 +122,7 @@ public void BitPanelOnDismissShouldWorkCorrect() Assert.AreEqual(1, currentCount); } - [DataTestMethod, + [TestMethod, DataRow(BitPanelPosition.End), DataRow(BitPanelPosition.Start), DataRow(BitPanelPosition.Top), diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/ScrollablePane/BitScrollablePaneTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/ScrollablePane/BitScrollablePaneTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/ScrollablePane/BitScrollablePaneTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/ScrollablePane/BitScrollablePaneTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Splitter/BitSplitterTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Splitter/BitSplitterTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Splitter/BitSplitterTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Splitter/BitSplitterTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Tooltip/BitTooltipTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Tooltip/BitTooltipTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Tooltip/BitTooltipTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Surfaces/Tooltip/BitTooltipTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Element/BitElementHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Element/BitElementHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Element/BitElementHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Element/BitElementHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Element/BitElementTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Element/BitElementTests.cs similarity index 95% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Element/BitElementTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Element/BitElementTests.cs index 921641485a..76537acea9 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Element/BitElementTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Element/BitElementTests.cs @@ -6,7 +6,7 @@ namespace Bit.BlazorUI.Tests.Components.Utilities.Element; [TestClass] public class BitElementTests : BunitTestContext { - [DataTestMethod] + [TestMethod] public void BitElementShouldRenderExpectedElement() { var component = RenderComponent(); @@ -14,7 +14,7 @@ public void BitElementShouldRenderExpectedElement() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("div"), DataRow("button"), DataRow("input"), @@ -33,7 +33,7 @@ public void BitElementShouldRespectElement(string element) component.MarkupMatches(@$"<{el} class=""bit-elm"" id:ignore>"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -49,7 +49,7 @@ public void BitElementShouldRespectIsEnabled(bool isEnabled) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitElementShouldRespectIsEnabledChangingAfterRender() { var component = RenderComponent(); @@ -64,7 +64,7 @@ public void BitElementShouldRespectIsEnabledChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("font-size: 14px; color: red;"), DataRow("padding: 1rem;"), DataRow(null) @@ -86,7 +86,7 @@ public void BitElementShouldRespectStyle(string style) } } - [DataTestMethod] + [TestMethod] public void BitElementShouldRespectStyleChangingAfterRender() { var component = RenderComponent(); @@ -101,7 +101,7 @@ public void BitElementShouldRespectStyleChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("test-class"), DataRow(null) ] @@ -117,7 +117,7 @@ public void BitElementShouldRespectClass(string @class) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitElementShouldRespectClassChangingAfterRender() { var component = RenderComponent(); @@ -132,7 +132,7 @@ public void BitElementShouldRespectClassChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("test-id"), DataRow(null) ] @@ -148,7 +148,7 @@ public void BitElementShouldRespectId(string id) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitDir.Rtl), DataRow(BitDir.Ltr), DataRow(BitDir.Auto), @@ -172,7 +172,7 @@ public void BitElementShouldRespectDir(BitDir? dir) } } - [DataTestMethod] + [TestMethod] public void BitElementShouldRespectDirChangingAfterRender() { var component = RenderComponent(); @@ -187,7 +187,7 @@ public void BitElementShouldRespectDirChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitVisibility.Visible), DataRow(BitVisibility.Collapsed), DataRow(BitVisibility.Hidden) @@ -213,7 +213,7 @@ public void BitElementShouldRespectVisibility(BitVisibility visibility) } } - [DataTestMethod] + [TestMethod] public void BitElementShouldRespectVisibilityChangingAfterRender() { var component = RenderComponent(); @@ -228,7 +228,7 @@ public void BitElementShouldRespectVisibilityChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("Bit Blazor UI"), DataRow(null) ] @@ -249,7 +249,7 @@ public void BitElementShouldRespectAriaLabel(string ariaLabel) } } - [DataTestMethod, + [TestMethod, DataRow("Bit Blazor UI"), DataRow("Bit Blazor UI"), DataRow(null) @@ -264,7 +264,7 @@ public void BitElementShouldRespectChildContent(string childContent) component.MarkupMatches(@$"
{childContent}"); } - [DataTestMethod] + [TestMethod] public void BitElementShouldRespectHtmlAttributes() { var component = RenderComponent(); diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Icon/BitIconHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Icon/BitIconHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Icon/BitIconHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Icon/BitIconHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Icon/BitIconTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Icon/BitIconTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Icon/BitIconTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Icon/BitIconTests.cs index 3ac30ce641..fca00d9fdc 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Icon/BitIconTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Icon/BitIconTests.cs @@ -8,7 +8,7 @@ public class BitIconTests : BunitTestContext { private const string CLASS = "bit-ico bit-ico-pri bit-ico-md bit-ico-txt"; - [DataTestMethod] + [TestMethod] public void BitIconShouldRenderExpectedElement() { var component = RenderComponent(); @@ -16,7 +16,7 @@ public void BitIconShouldRenderExpectedElement() component.MarkupMatches(@$""); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -32,7 +32,7 @@ public void BitIconShouldRespectIsEnabled(bool isEnabled) component.MarkupMatches(@$""); } - [DataTestMethod] + [TestMethod] public void BitIconShouldRespectIsEnabledChangingAfterRender() { var component = RenderComponent(); @@ -47,7 +47,7 @@ public void BitIconShouldRespectIsEnabledChangingAfterRender() component.MarkupMatches(@$""); } - [DataTestMethod, + [TestMethod, DataRow("VisualStudioForWindows"), DataRow("AzureIcon"), DataRow(""), @@ -65,7 +65,7 @@ public void BitIconShouldRespectIconName(string iconName) component.MarkupMatches(@$""); } - [DataTestMethod] + [TestMethod] public void BitIconShouldRespectIconNameChangingAfterRender() { var component = RenderComponent(); @@ -80,7 +80,7 @@ public void BitIconShouldRespectIconNameChangingAfterRender() component.MarkupMatches(@$""); } - [DataTestMethod, + [TestMethod, DataRow("font-size: 14px; color: red;"), DataRow("padding: 1rem;"), DataRow(null) @@ -102,7 +102,7 @@ public void BitIconShouldRespectStyle(string style) } } - [DataTestMethod] + [TestMethod] public void BitIconShouldRespectStyleChangingAfterRender() { var component = RenderComponent(); @@ -117,7 +117,7 @@ public void BitIconShouldRespectStyleChangingAfterRender() component.MarkupMatches(@$""); } - [DataTestMethod, + [TestMethod, DataRow("test-class"), DataRow(null) ] @@ -133,7 +133,7 @@ public void BitIconShouldRespectClass(string @class) component.MarkupMatches(@$""); } - [DataTestMethod] + [TestMethod] public void BitIconShouldRespectClassChangingAfterRender() { var component = RenderComponent(); @@ -148,7 +148,7 @@ public void BitIconShouldRespectClassChangingAfterRender() component.MarkupMatches(@$""); } - [DataTestMethod, + [TestMethod, DataRow("test-id"), DataRow(null) ] @@ -164,7 +164,7 @@ public void BitIconShouldRespectId(string id) component.MarkupMatches(@$""); } - [DataTestMethod, + [TestMethod, DataRow(BitDir.Rtl), DataRow(BitDir.Ltr), DataRow(BitDir.Auto), @@ -188,7 +188,7 @@ public void BitIconShouldRespectDir(BitDir? dir) } } - [DataTestMethod] + [TestMethod] public void BitIconShouldRespectDirChangingAfterRender() { var component = RenderComponent(); @@ -203,7 +203,7 @@ public void BitIconShouldRespectDirChangingAfterRender() component.MarkupMatches(@$""); } - [DataTestMethod, + [TestMethod, DataRow(BitVisibility.Visible), DataRow(BitVisibility.Collapsed), DataRow(BitVisibility.Hidden) @@ -229,7 +229,7 @@ public void BitIconShouldRespectVisibility(BitVisibility visibility) } } - [DataTestMethod] + [TestMethod] public void BitIconShouldRespectVisibilityChangingAfterRender() { var component = RenderComponent(); @@ -244,7 +244,7 @@ public void BitIconShouldRespectVisibilityChangingAfterRender() component.MarkupMatches(@$""); } - [DataTestMethod, + [TestMethod, DataRow("Bit Blazor UI"), DataRow(null) ] @@ -265,7 +265,7 @@ public void BitIconShouldRespectAriaLabel(string ariaLabel) } } - [DataTestMethod, + [TestMethod, DataRow(BitSize.Small), DataRow(BitSize.Medium), DataRow(BitSize.Large), @@ -289,7 +289,7 @@ public void BitIconShouldRespectSize(BitSize? size) component.MarkupMatches(@$""); } - [DataTestMethod] + [TestMethod] public void BitIconShouldRespectSizeChangingAfterRender() { var component = RenderComponent(); @@ -304,7 +304,7 @@ public void BitIconShouldRespectSizeChangingAfterRender() component.MarkupMatches(@""); } - [DataTestMethod, + [TestMethod, DataRow(BitColor.Primary), DataRow(BitColor.Secondary), DataRow(BitColor.Tertiary), @@ -338,7 +338,7 @@ public void BitIconShouldRespectColor(BitColor? color) component.MarkupMatches(@$""); } - [DataTestMethod] + [TestMethod] public void BitIconShouldRespectColorChangingAfterRender() { var component = RenderComponent(); @@ -353,7 +353,7 @@ public void BitIconShouldRespectColorChangingAfterRender() component.MarkupMatches(@""); } - [DataTestMethod] + [TestMethod] public void BitIconShouldRespectHtmlAttributes() { var component = RenderComponent(); diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Image/BitImageHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Image/BitImageHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Image/BitImageHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Image/BitImageHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Image/BitImageTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Image/BitImageTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Image/BitImageTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Image/BitImageTests.cs index 49fafd4d3c..6586cf5e16 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Image/BitImageTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Image/BitImageTests.cs @@ -9,7 +9,7 @@ namespace Bit.BlazorUI.Tests.Components.Utilities.Image; [TestClass] public class BitImageTests : BunitTestContext { - [DataTestMethod] + [TestMethod] public void BitImageShouldRenderExpectedElement() { var component = RenderComponent(); @@ -17,7 +17,7 @@ public void BitImageShouldRenderExpectedElement() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -33,7 +33,7 @@ public void BitImageShouldRespectIsEnabled(bool isEnabled) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitImageShouldRespectIsEnabledChangingAfterRender() { var component = RenderComponent(); @@ -48,7 +48,7 @@ public void BitImageShouldRespectIsEnabledChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("font-size: 14px; color: red;"), DataRow("padding: 1rem;"), DataRow(null) @@ -70,7 +70,7 @@ public void BitImageShouldRespectStyle(string style) } } - [DataTestMethod] + [TestMethod] public void BitImageShouldRespectStyleChangingAfterRender() { var component = RenderComponent(); @@ -86,7 +86,7 @@ public void BitImageShouldRespectStyleChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("margin: 14px;", "padding: 1rem;"), DataRow("background-color: #fff;", "border: 2px solid red"), ] @@ -100,7 +100,7 @@ public void BitImageShouldRespectStyles(string rootStyle, string imageStyle) component.MarkupMatches(@$"
"); } - [DataTestMethod, Ignore] + [TestMethod, Ignore] public void BitImageShouldRespectStylesChangingAfterRender() { var component = RenderComponent(); @@ -117,7 +117,7 @@ public void BitImageShouldRespectStylesChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("test-class"), DataRow(null) ] @@ -133,7 +133,7 @@ public void BitImageShouldRespectClass(string @class) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitImageShouldRespectClassChangingAfterRender() { var component = RenderComponent(); @@ -150,7 +150,7 @@ public void BitImageShouldRespectClassChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("test-root-class", "test-image-class") ] public void BitImageShouldRespectClasses(string rootClass, string imageClass) @@ -163,7 +163,7 @@ public void BitImageShouldRespectClasses(string rootClass, string imageClass) component.MarkupMatches(@$"
"); } - [DataTestMethod, Ignore] + [TestMethod, Ignore] public void BitImageShouldRespectClassesChangingAfterRender() { var component = RenderComponent(); @@ -180,7 +180,7 @@ public void BitImageShouldRespectClassesChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("test-id"), DataRow(null) ] @@ -196,7 +196,7 @@ public void BitImageShouldRespectId(string id) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitDir.Rtl), DataRow(BitDir.Ltr), DataRow(BitDir.Auto), @@ -220,7 +220,7 @@ public void BitImageShouldRespectDir(BitDir? dir) } } - [DataTestMethod] + [TestMethod] public void BitImageShouldRespectDirChangingAfterRender() { var component = RenderComponent(); @@ -235,7 +235,7 @@ public void BitImageShouldRespectDirChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitVisibility.Visible), DataRow(BitVisibility.Collapsed), DataRow(BitVisibility.Hidden) @@ -257,7 +257,7 @@ public void BitImageShouldRespectVisibility(BitVisibility visibility) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitImageShouldRespectVisibilityChangingAfterRender() { var component = RenderComponent(); @@ -272,7 +272,7 @@ public void BitImageShouldRespectVisibilityChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod] + [TestMethod] public void BitImageShouldRespectHtmlAttributes() { var component = RenderComponent(); @@ -280,7 +280,7 @@ public void BitImageShouldRespectHtmlAttributes() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("BitBlazor"), DataRow("Bit Platform"), DataRow(null) @@ -302,7 +302,7 @@ public void BitImageShouldRespectAlt(string alt) } } - [DataTestMethod, + [TestMethod, DataRow(BitImageCover.Landscape), DataRow(BitImageCover.Portrait), DataRow(null) @@ -324,7 +324,7 @@ public void BitImageShouldRespectCoverStyle(BitImageCover? coverStyle) } } - [DataTestMethod, + [TestMethod, DataRow("85.69"), DataRow("69px"), DataRow("69rem"), @@ -357,7 +357,7 @@ public void BitImageShouldRespectHeight(string height) } } - [DataTestMethod] + [TestMethod] public void BitImageShouldRespectHeightChangingAfterRender() { var component = RenderComponent(); @@ -372,7 +372,7 @@ public void BitImageShouldRespectHeightChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("85.69"), DataRow("69px"), DataRow("69rem"), @@ -405,7 +405,7 @@ public void BitImageShouldRespectWidth(string width) } } - [DataTestMethod] + [TestMethod] public void BitImageShouldRespectWidthChangingAfterRender() { var component = RenderComponent(); @@ -420,7 +420,7 @@ public void BitImageShouldRespectWidthChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("85", "69"), DataRow("85rem", "69rem"), DataRow("85rem", "69px"), @@ -456,7 +456,7 @@ public void BitImageShouldRespectHeightAndWidth(string height, string width) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("dir", "ltr"), DataRow("foo", "bar") ] @@ -473,7 +473,7 @@ public void BitImageShouldRespectImageAttributes(string attrKey, string attrValu component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitImageFit.None), DataRow(BitImageFit.Center), DataRow(BitImageFit.Contain), @@ -503,7 +503,7 @@ public void BitImageShouldRespectImageFit(BitImageFit? imageFit) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("85px", "69px", BitImageFit.Center), DataRow("85px", "69px", null), DataRow("85px", null, BitImageFit.Center), @@ -560,7 +560,7 @@ public void BitImageShouldRespectHeightWidthAndImageFit(string height, string wi } } - [DataTestMethod, + [TestMethod, DataRow(BitImageLoading.Lazy), DataRow(null) ] @@ -581,7 +581,7 @@ public void BitImageShouldRespectLoading(BitImageLoading? loading) } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -597,7 +597,7 @@ public void BitImageShouldRespectMaximizeFrame(bool maximizeFrame) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -617,7 +617,7 @@ public void BitImageShouldRespectOnClick(bool isEnabled) Assert.AreEqual(expected, clickedValue); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -633,7 +633,7 @@ public void BitImageShouldRespectFadeIn(bool fadeIn) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -649,7 +649,7 @@ public void BitImageShouldRespectStartVisible(bool startVisible) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("bit-logo-blue.png"), DataRow("https://blazorui.bitplatform.dev/bit-logo-blue.png"), DataRow(null) @@ -671,7 +671,7 @@ public void BitImageShouldRespectSrc(string src) } } - [DataTestMethod, + [TestMethod, DataRow("Bit title"), DataRow(null) ] diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Labels/BitLabelHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Labels/BitLabelHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Labels/BitLabelHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Labels/BitLabelHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Labels/BitLabelTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Labels/BitLabelTests.cs similarity index 95% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Labels/BitLabelTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Labels/BitLabelTests.cs index 61665dab29..f1c5991731 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Labels/BitLabelTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Labels/BitLabelTests.cs @@ -6,7 +6,7 @@ namespace Bit.BlazorUI.Tests.Components.Utilities.Labels; [TestClass] public class BitLabelTests : BunitTestContext { - [DataTestMethod] + [TestMethod] public void BitLabelShouldRenderExpectedElement() { var component = RenderComponent(); @@ -14,7 +14,7 @@ public void BitLabelShouldRenderExpectedElement() component.MarkupMatches(@""); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -30,7 +30,7 @@ public void BitLabelShouldRespectIsEnabled(bool isEnabled) component.MarkupMatches(@$""); } - [DataTestMethod] + [TestMethod] public void BitLabelShouldRespectIsEnabledChangingAfterRender() { var component = RenderComponent(); @@ -45,7 +45,7 @@ public void BitLabelShouldRespectIsEnabledChangingAfterRender() component.MarkupMatches(@""); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -61,7 +61,7 @@ public void BitLabelShouldRespectRequired(bool required) component.MarkupMatches(@$""); } - [DataTestMethod] + [TestMethod] public void BitLabelShouldRespectRequiredChangingAfterRender() { var component = RenderComponent(); @@ -76,7 +76,7 @@ public void BitLabelShouldRespectRequiredChangingAfterRender() component.MarkupMatches(@""); } - [DataTestMethod, + [TestMethod, DataRow("font-size: 14px; color: red;"), DataRow("padding: 1rem;"), DataRow(null) @@ -98,7 +98,7 @@ public void BitLabelShouldRespectStyle(string style) } } - [DataTestMethod] + [TestMethod] public void BitLabelShouldRespectStyleChangingAfterRender() { var component = RenderComponent(); @@ -113,7 +113,7 @@ public void BitLabelShouldRespectStyleChangingAfterRender() component.MarkupMatches(@""); } - [DataTestMethod, + [TestMethod, DataRow("test-class"), DataRow(null) ] @@ -129,7 +129,7 @@ public void BitLabelShouldRespectClass(string @class) component.MarkupMatches(@$""); } - [DataTestMethod] + [TestMethod] public void BitLabelShouldRespectClassChangingAfterRender() { var component = RenderComponent(); @@ -144,7 +144,7 @@ public void BitLabelShouldRespectClassChangingAfterRender() component.MarkupMatches(@""); } - [DataTestMethod, + [TestMethod, DataRow("test-id"), DataRow(null) ] @@ -160,7 +160,7 @@ public void BitLabelShouldRespectId(string id) component.MarkupMatches(@$""); } - [DataTestMethod, + [TestMethod, DataRow("test-for"), DataRow(null) ] @@ -181,7 +181,7 @@ public void BitLabelShouldRespectFor(string @for) } } - [DataTestMethod, + [TestMethod, DataRow(BitDir.Rtl), DataRow(BitDir.Ltr), DataRow(BitDir.Auto), @@ -205,7 +205,7 @@ public void BitLabelShouldRespectDir(BitDir? dir) } } - [DataTestMethod] + [TestMethod] public void BitLabelShouldRespectDirChangingAfterRender() { var component = RenderComponent(); @@ -220,7 +220,7 @@ public void BitLabelShouldRespectDirChangingAfterRender() component.MarkupMatches(@""); } - [DataTestMethod, + [TestMethod, DataRow(BitVisibility.Visible), DataRow(BitVisibility.Collapsed), DataRow(BitVisibility.Hidden) @@ -246,7 +246,7 @@ public void BitLabelShouldRespectVisibility(BitVisibility visibility) } } - [DataTestMethod] + [TestMethod] public void BitLabelShouldRespectVisibilityChangingAfterRender() { var component = RenderComponent(); @@ -261,7 +261,7 @@ public void BitLabelShouldRespectVisibilityChangingAfterRender() component.MarkupMatches(@""); } - [DataTestMethod, + [TestMethod, DataRow("Bit Blazor UI"), DataRow("Bit Blazor UI"), DataRow(null) @@ -276,7 +276,7 @@ public void BitLabelShouldRespectChildContent(string childContent) component.MarkupMatches(@$""); } - [DataTestMethod, + [TestMethod, DataRow("Bit Blazor UI"), DataRow(null) ] @@ -297,7 +297,7 @@ public void BitLabelShouldRespectAriaLabel(string ariaLabel) } } - [DataTestMethod] + [TestMethod] public void BitLabelShouldRespectHtmlAttributes() { var component = RenderComponent(); diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Link/BitLinkHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Link/BitLinkHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Link/BitLinkHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Link/BitLinkHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Link/BitLinkTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Link/BitLinkTests.cs similarity index 98% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Link/BitLinkTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Link/BitLinkTests.cs index d2d0f37a92..62c10405f1 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Link/BitLinkTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Link/BitLinkTests.cs @@ -8,7 +8,7 @@ namespace Bit.BlazorUI.Tests.Components.Utilities.Link; [TestClass] public class BitLinkTests : BunitTestContext { - [DataTestMethod] + [TestMethod] public void BitLinkShouldRenderExpectedElement() { var component = RenderComponent(); @@ -16,7 +16,7 @@ public void BitLinkShouldRenderExpectedElement() component.MarkupMatches(@""); } - [DataTestMethod, + [TestMethod, DataRow("https://bitplatform.dev"), DataRow("#go-to-section"), DataRow(""), @@ -51,7 +51,7 @@ public void BitLinkShouldRenderHref(string href) } } - [DataTestMethod, + [TestMethod, DataRow(null, "_blank"), DataRow(null, null), DataRow(null, ""), @@ -94,7 +94,7 @@ public void BitLinkShouldRespectTarget(string href, string target) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("https://bitplatform.dev"), DataRow("#go-to-section") @@ -119,7 +119,7 @@ public void BitLinkShouldRespectIsEnabled(string href) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("https://bitplatform.dev"), DataRow("#go-to-section") @@ -148,7 +148,7 @@ public void BitLinkShouldRespectIsEnabledChangingAfterRender(string href) } } - [DataTestMethod, + [TestMethod, DataRow(null, "font-size: 14px; color: red;"), DataRow(null, null), DataRow("https://bitplatform.dev", "font-size: 14px; color: red;"), @@ -176,7 +176,7 @@ public void BitLinkShouldRespectStyle(string href, string style) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("https://bitplatform.dev"), DataRow("#go-to-section"), @@ -205,7 +205,7 @@ public void BitLinkShouldRespectStyleChangingAfterRender(string href) } } - [DataTestMethod, + [TestMethod, DataRow(null, "test-class"), DataRow(null, null), DataRow("https://bitplatform.dev", "test-class"), @@ -233,7 +233,7 @@ public void BitLinkShouldRespectClass(string href, string @class) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("https://bitplatform.dev"), DataRow("#go-to-section") @@ -262,7 +262,7 @@ public void BitLinkShouldRespectClassChangingAfterRender(string href) } } - [DataTestMethod, + [TestMethod, DataRow(null, "test-id"), DataRow(null, null), DataRow("https://bitplatform.dev", "test-id"), @@ -290,7 +290,7 @@ public void BitLinkShouldRespectId(string href, string id) } } - [DataTestMethod, + [TestMethod, DataRow(null, BitDir.Rtl), DataRow(null, BitDir.Ltr), DataRow(null, BitDir.Auto), @@ -325,7 +325,7 @@ public void BitLinkShouldRespectDir(string href, BitDir? dir) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("https://bitplatform.dev"), DataRow("#go-to-section") @@ -354,7 +354,7 @@ public void BitLinkShouldRespectDirChangingAfterRender(string href) } } - [DataTestMethod, + [TestMethod, DataRow(null, BitVisibility.Visible), DataRow(null, BitVisibility.Collapsed), DataRow(null, BitVisibility.Hidden), @@ -391,7 +391,7 @@ public void BitLinkShouldRespectVisibility(string href, BitVisibility visibility } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("https://bitplatform.dev"), DataRow("#go-to-section") @@ -420,7 +420,7 @@ public void BitLinkShouldRespectVisibilityChangingAfterRender(string href) } } - [DataTestMethod, + [TestMethod, DataRow(null, "Bit Blazor UI"), DataRow(null, "Bit Blazor UI"), DataRow(null, null), @@ -449,7 +449,7 @@ public void BitLinkShouldRespectChildContent(string href, string childContent) } } - [DataTestMethod, + [TestMethod, DataRow(null, "Bit Blazor UI"), DataRow(null, null), DataRow("https://bitplatform.dev", "Bit Blazor UI"), @@ -477,7 +477,7 @@ public void BitLinkShouldRespectAriaLabel(string href, string ariaLabel) } } - [DataTestMethod, + [TestMethod, DataRow(null, true), DataRow(null, false), DataRow("https://bitplatform.dev", true), @@ -505,7 +505,7 @@ public void BitLinkShouldRespectUnderlined(string href, bool underlined) } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow("https://bitplatform.dev"), DataRow("#go-to-section") @@ -580,7 +580,7 @@ public void BitLinkScrollIntoViewTest(bool isEnabled) } } - [DataTestMethod, + [TestMethod, DataRow("https://bitplatform.dev"), DataRow("#go-to-section"), DataRow(""), @@ -602,7 +602,7 @@ public void BitLinkShouldRespectHtmlAttributes(string href) } } - [DataTestMethod, + [TestMethod, DataRow(null, null), DataRow(null, BitLinkRels.Bookmark), DataRow(null, BitLinkRels.Bookmark | BitLinkRels.Alternate), diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/MediaQuery/BitMediaQueryTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/MediaQuery/BitMediaQueryTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/MediaQuery/BitMediaQueryTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/MediaQuery/BitMediaQueryTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Overlay/BitOverlayHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Overlay/BitOverlayHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Overlay/BitOverlayHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Overlay/BitOverlayHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Overlay/BitOverlayTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Overlay/BitOverlayTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Overlay/BitOverlayTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Overlay/BitOverlayTests.cs index d0edd97930..db48ca77dc 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Overlay/BitOverlayTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Overlay/BitOverlayTests.cs @@ -6,7 +6,7 @@ namespace Bit.BlazorUI.Tests.Components.Utilities.Overlay; [TestClass] public class BitOverlayTests : BunitTestContext { - [DataTestMethod] + [TestMethod] public void BitOverlayShouldRenderExpectedElement() { var component = RenderComponent(); @@ -14,7 +14,7 @@ public void BitOverlayShouldRenderExpectedElement() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -30,7 +30,7 @@ public void BitOverlayShouldRespectIsEnabled(bool isEnabled) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitOverlayShouldRespectIsEnabledChangingAfterRender() { var component = RenderComponent(); @@ -45,7 +45,7 @@ public void BitOverlayShouldRespectIsEnabledChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("font-size: 14px; color: red;"), DataRow("padding: 1rem;"), DataRow(null) @@ -67,7 +67,7 @@ public void BitOverlayShouldRespectStyle(string style) } } - [DataTestMethod] + [TestMethod] public void BitOverlayShouldRespectStyleChangingAfterRender() { var component = RenderComponent(); @@ -83,7 +83,7 @@ public void BitOverlayShouldRespectStyleChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("test-class"), DataRow(null) ] @@ -99,7 +99,7 @@ public void BitOverlayShouldRespectClass(string @class) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitOverlayShouldRespectClassChangingAfterRender() { var component = RenderComponent(); @@ -116,7 +116,7 @@ public void BitOverlayShouldRespectClassChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("test-id"), DataRow(null) ] @@ -132,7 +132,7 @@ public void BitOverlayShouldRespectId(string id) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitDir.Rtl), DataRow(BitDir.Ltr), DataRow(BitDir.Auto), @@ -156,7 +156,7 @@ public void BitOverlayShouldRespectDir(BitDir? dir) } } - [DataTestMethod] + [TestMethod] public void BitOverlayShouldRespectDirChangingAfterRender() { var component = RenderComponent(); @@ -171,7 +171,7 @@ public void BitOverlayShouldRespectDirChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitVisibility.Visible), DataRow(BitVisibility.Collapsed), DataRow(BitVisibility.Hidden) @@ -193,7 +193,7 @@ public void BitOverlayShouldRespectVisibility(BitVisibility visibility) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitOverlayShouldRespectVisibilityChangingAfterRender() { var component = RenderComponent(); @@ -208,7 +208,7 @@ public void BitOverlayShouldRespectVisibilityChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("Bit Blazor UI"), DataRow("Bit Blazor UI"), DataRow(null) @@ -226,7 +226,7 @@ public void BitOverlayShouldRespectChildContent(string childContent) component.MarkupMatches(@$"
{childContent}
"); } - [DataTestMethod] + [TestMethod] public void BitOverlayShouldRespectHtmlAttributes() { var component = RenderComponent(); @@ -234,7 +234,7 @@ public void BitOverlayShouldRespectHtmlAttributes() component.MarkupMatches(@$"
I'm an overlay
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -268,7 +268,7 @@ public void BitOverlayShouldRespectNoAutoClose(bool noAutoClose) } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -295,7 +295,7 @@ public void BitOverlayShouldRespectAutoToggleScroll(bool autoToggleScroll) } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -311,7 +311,7 @@ public void BitOverlayShouldRespectAbsolutePosition(bool absolutePosition) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitOverlayShouldRespectAbsolutePositionChangingAfterRender() { var component = RenderComponent(); @@ -326,7 +326,7 @@ public void BitOverlayShouldRespectAbsolutePositionChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -352,7 +352,7 @@ public void BitOverlayShouldRespectIsOpen(bool IsOpen) Assert.IsFalse(isOpenBind); } - [DataTestMethod] + [TestMethod] public void BitOverlayShouldRespectIsOpenChangingAfterRender() { var isOpen = false; @@ -372,7 +372,7 @@ public void BitOverlayShouldRespectIsOpenChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/PullToRefresh/BitPullToRefreshTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/PullToRefresh/BitPullToRefreshTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/PullToRefresh/BitPullToRefreshTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/PullToRefresh/BitPullToRefreshTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Separator/BitSeparatorHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Separator/BitSeparatorHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Separator/BitSeparatorHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Separator/BitSeparatorHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Separator/BitSeparatorTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Separator/BitSeparatorTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Separator/BitSeparatorTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Separator/BitSeparatorTests.cs index 5cab330725..62c1d333de 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Separator/BitSeparatorTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Separator/BitSeparatorTests.cs @@ -6,7 +6,7 @@ namespace Bit.BlazorUI.Tests.Components.Utilities.Separator; [TestClass] public class BitSeparatorTests : BunitTestContext { - [DataTestMethod] + [TestMethod] public void BitSeparatorShouldRenderExpectedElement() { var component = RenderComponent(); @@ -14,7 +14,7 @@ public void BitSeparatorShouldRenderExpectedElement() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -30,7 +30,7 @@ public void BitSeparatorShouldRespectIsEnabled(bool isEnabled) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitSeparatorShouldRespectIsEnabledChangingAfterRender() { var component = RenderComponent(); @@ -45,7 +45,7 @@ public void BitSeparatorShouldRespectIsEnabledChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("font-size: 14px; color: red;"), DataRow("padding: 1rem;"), DataRow(null) @@ -67,7 +67,7 @@ public void BitSeparatorShouldRespectStyle(string style) } } - [DataTestMethod] + [TestMethod] public void BitSeparatorShouldRespectStyleChangingAfterRender() { var component = RenderComponent(); @@ -83,7 +83,7 @@ public void BitSeparatorShouldRespectStyleChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("test-class"), DataRow(null) ] @@ -99,7 +99,7 @@ public void BitSeparatorShouldRespectClass(string @class) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitSeparatorShouldRespectClassChangingAfterRender() { var component = RenderComponent(); @@ -116,7 +116,7 @@ public void BitSeparatorShouldRespectClassChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("test-id"), DataRow(null) ] @@ -132,7 +132,7 @@ public void BitSeparatorShouldRespectId(string id) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitDir.Rtl), DataRow(BitDir.Ltr), DataRow(BitDir.Auto), @@ -156,7 +156,7 @@ public void BitSeparatorShouldRespectDir(BitDir? dir) } } - [DataTestMethod] + [TestMethod] public void BitSeparatorShouldRespectDirChangingAfterRender() { var component = RenderComponent(); @@ -171,7 +171,7 @@ public void BitSeparatorShouldRespectDirChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitVisibility.Visible), DataRow(BitVisibility.Collapsed), DataRow(BitVisibility.Hidden) @@ -197,7 +197,7 @@ public void BitSeparatorShouldRespectVisibility(BitVisibility visibility) } } - [DataTestMethod] + [TestMethod] public void BitSeparatorShouldRespectVisibilityChangingAfterRender() { var component = RenderComponent(); @@ -212,7 +212,7 @@ public void BitSeparatorShouldRespectVisibilityChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("Bit Blazor UI"), DataRow(null) ] @@ -233,7 +233,7 @@ public void BitSeparatorShouldRespectAriaLabel(string ariaLabel) } } - [DataTestMethod, + [TestMethod, DataRow("Bit Blazor UI"), DataRow("Bit Blazor UI"), DataRow(null) @@ -262,7 +262,7 @@ public void BitSeparatorShouldRespectChildContent(string childContent) } } - [DataTestMethod] + [TestMethod] public void BitSeparatorShouldRespectHtmlAttributes() { var component = RenderComponent(); @@ -274,7 +274,7 @@ public void BitSeparatorShouldRespectHtmlAttributes()
"); } - [DataTestMethod, + [TestMethod, DataRow(BitSeparatorAlignContent.Start), DataRow(BitSeparatorAlignContent.Center), DataRow(BitSeparatorAlignContent.End) @@ -296,7 +296,7 @@ public void BitSeparatorShouldRespectAlignContent(BitSeparatorAlignContent align component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -318,7 +318,7 @@ Bit Blazor UI "); } - [DataTestMethod] + [TestMethod] public void BitSeparatorShouldRespectVerticalChangingAfterRender() { var component = RenderComponent(parameters => @@ -344,7 +344,7 @@ Bit Blazor UI "); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -365,7 +365,7 @@ public void BitSeparatorShouldRespectAutoSize(bool autoSize) } } - [DataTestMethod] + [TestMethod] public void BitSeparatorShouldRespectAutoSizeChangingAfterRender() { var component = RenderComponent(); @@ -380,7 +380,7 @@ public void BitSeparatorShouldRespectAutoSizeChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(BitColorKind.Primary), DataRow(BitColorKind.Secondary), @@ -406,7 +406,7 @@ public void BitSeparatorShouldRespectBackground(BitColorKind? background) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitSeparatorShouldRespectBackgroundChangingAfterRender() { var component = RenderComponent(); @@ -421,7 +421,7 @@ public void BitSeparatorShouldRespectBackgroundChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(BitColorKind.Primary), DataRow(BitColorKind.Secondary), @@ -447,7 +447,7 @@ public void BitSeparatorShouldRespectBorder(BitColorKind? border) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitSeparatorShouldRespectBorderChangingAfterRender() { var component = RenderComponent(); @@ -462,7 +462,7 @@ public void BitSeparatorShouldRespectBorderChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -484,7 +484,7 @@ public void BitSeparatorShouldRespectAutoSizeInVertical(bool autoSize) } } - [DataTestMethod] + [TestMethod] public void BitSeparatorShouldRespectAutoSizeChangingAfterRenderInVertical() { var component = RenderComponent(parameters => diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Stack/BitStackHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Stack/BitStackHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Stack/BitStackHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Stack/BitStackHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Stack/BitStackTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Stack/BitStackTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Stack/BitStackTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Stack/BitStackTests.cs index 93ec6ea1d6..b677c318dc 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Stack/BitStackTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Stack/BitStackTests.cs @@ -23,7 +23,7 @@ public class BitStackTests : BunitTestContext { BitAlignment.Stretch, "stretch" }, }; - [DataTestMethod] + [TestMethod] public void BitStackShouldRenderExpectedElement() { var component = RenderComponent(); @@ -31,7 +31,7 @@ public void BitStackShouldRenderExpectedElement() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -47,7 +47,7 @@ public void BitStackShouldRespectIsEnabled(bool isEnabled) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectIsEnabledChangingAfterRender() { var component = RenderComponent(); @@ -62,7 +62,7 @@ public void BitStackShouldRespectIsEnabledChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("font-size: 14px; color: red;"), DataRow("padding: 1rem;"), DataRow(null) @@ -77,7 +77,7 @@ public void BitStackShouldRespectStyle(string style) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectStyleChangingAfterRender() { var component = RenderComponent(); @@ -93,7 +93,7 @@ public void BitStackShouldRespectStyleChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("test-class"), DataRow(null) ] @@ -109,7 +109,7 @@ public void BitStackShouldRespectClass(string @class) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectClassChangingAfterRender() { var component = RenderComponent(); @@ -126,7 +126,7 @@ public void BitStackShouldRespectClassChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("test-id"), DataRow(null) ] @@ -142,7 +142,7 @@ public void BitStackShouldRespectId(string id) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitDir.Rtl), DataRow(BitDir.Ltr), DataRow(BitDir.Auto), @@ -166,7 +166,7 @@ public void BitStackShouldRespectDir(BitDir? dir) } } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectDirChangingAfterRender() { var component = RenderComponent(); @@ -181,7 +181,7 @@ public void BitStackShouldRespectDirChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitVisibility.Visible), DataRow(BitVisibility.Collapsed), DataRow(BitVisibility.Hidden) @@ -203,7 +203,7 @@ public void BitStackShouldRespectVisibility(BitVisibility visibility) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectVisibilityChangingAfterRender() { var component = RenderComponent(); @@ -218,7 +218,7 @@ public void BitStackShouldRespectVisibilityChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("Bit Blazor UI"), DataRow("Bit Blazor UI"), DataRow(null) @@ -236,7 +236,7 @@ public void BitStackShouldRespectChildContent(string childContent) component.MarkupMatches(@$"
{childContent}
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectHtmlAttributes() { var component = RenderComponent(); @@ -244,7 +244,7 @@ public void BitStackShouldRespectHtmlAttributes() component.MarkupMatches(@$"
I'm a stack
"); } - [DataTestMethod, + [TestMethod, DataRow("p"), DataRow("span"), DataRow(null) @@ -260,7 +260,7 @@ public void BitStackShouldRespectElement(string element) component.MarkupMatches(@$"<{el} class=""bit-stc"" style=""{STYLE}"" id:ignore>"); } - [DataTestMethod, + [TestMethod, DataRow(true, true), DataRow(false, true), DataRow(true, false), @@ -280,7 +280,7 @@ public void BitStackShouldRespectFillContent(bool fillContent, bool horizontal) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false)] public void BitStackShouldRespectFillContentChangingAfterRender(bool horizontal) @@ -301,7 +301,7 @@ public void BitStackShouldRespectFillContentChangingAfterRender(bool horizontal) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("10px"), DataRow("1rem"), DataRow(null) @@ -318,7 +318,7 @@ public void BitStackShouldRespectGap(string gap) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectGapChangingAfterRender() { var component = RenderComponent(); @@ -334,7 +334,7 @@ public void BitStackShouldRespectGapChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("3"), DataRow("initial"), DataRow("inherit"), @@ -352,7 +352,7 @@ public void BitStackShouldRespectGrow(string grow) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectGrowChangingAfterRender() { var component = RenderComponent(); @@ -368,7 +368,7 @@ public void BitStackShouldRespectGrowChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -384,7 +384,7 @@ public void BitStackShouldRespectGrows(bool grows) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectGrowsChangingAfterRender() { var component = RenderComponent(); @@ -399,7 +399,7 @@ public void BitStackShouldRespectGrowsChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -415,7 +415,7 @@ public void BitStackShouldRespectHorizontal(bool horizontal) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectHorizontalChangingAfterRender() { var component = RenderComponent(); @@ -430,7 +430,7 @@ public void BitStackShouldRespectHorizontalChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(BitAlignment.Start), DataRow(BitAlignment.End), @@ -461,7 +461,7 @@ public void BitStackShouldRespectAlignment(BitAlignment? alignment) } } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectAlignmentChangingAfterRender() { var component = RenderComponent(); @@ -476,7 +476,7 @@ public void BitStackShouldRespectAlignmentChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitAlignment.Start), DataRow(BitAlignment.End), DataRow(BitAlignment.Center), @@ -498,7 +498,7 @@ public void BitStackShouldRespectHorizontalAlign(BitAlignment horizontalAlign) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectHorizontalAlignChangingAfterRender() { var component = RenderComponent(); @@ -513,7 +513,7 @@ public void BitStackShouldRespectHorizontalAlignChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -529,7 +529,7 @@ public void BitStackShouldRespectReversed(bool reversed) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectReversedChangingAfterRender() { var component = RenderComponent(); @@ -544,7 +544,7 @@ public void BitStackShouldRespectReversedChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitAlignment.Start), DataRow(BitAlignment.End), DataRow(BitAlignment.Center), @@ -566,7 +566,7 @@ public void BitStackShouldRespectVerticalAlign(BitAlignment verticalAlign) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectVerticalAlignChangingAfterRender() { var component = RenderComponent(); @@ -581,7 +581,7 @@ public void BitStackShouldRespectVerticalAlignChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -597,7 +597,7 @@ public void BitStackShouldRespectWrap(bool wrap) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectWrapChangingAfterRender() { var component = RenderComponent(); @@ -612,7 +612,7 @@ public void BitStackShouldRespectWrapChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true, null), DataRow(true, "2"), DataRow(false, null), @@ -631,7 +631,7 @@ public void BitStackShouldRespectGrowsAndGrow(bool grows, string grow) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true, true), DataRow(true, false), DataRow(false, true), @@ -650,7 +650,7 @@ public void BitStackShouldRespectHorizontalAndReversed(bool horizontal, bool rev component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -678,7 +678,7 @@ public void BitStackShouldRespectHorizontalAndReversedAndHorizontalAlignAndVerti } } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -694,7 +694,7 @@ public void BitStackShouldRespectAutoSize(bool autoSize) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectAutoSizeChangingAfterRender() { var component = RenderComponent(); @@ -709,7 +709,7 @@ public void BitStackShouldRespectAutoSizeChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -725,7 +725,7 @@ public void BitStackShouldRespectAutoWidth(bool autoWidth) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectAutoWidthChangingAfterRender() { var component = RenderComponent(); @@ -740,7 +740,7 @@ public void BitStackShouldRespectAutoWidthChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -756,7 +756,7 @@ public void BitStackShouldRespectAutoHeight(bool autoHeight) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectAutoHeightChangingAfterRender() { var component = RenderComponent(); @@ -771,7 +771,7 @@ public void BitStackShouldRespectAutoHeightChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true, true, true), DataRow(true, true, false), DataRow(true, false, true), @@ -805,7 +805,7 @@ public void BitStackShouldRespectAutoSizeAndAutoWidthAndAutoHeight(bool autoSize component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -821,7 +821,7 @@ public void BitStackShouldRespectFitHeight(bool fitHeight) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectFitHeightChangingAfterRender() { var component = RenderComponent(); @@ -836,7 +836,7 @@ public void BitStackShouldRespectFitHeightChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -852,7 +852,7 @@ public void BitStackShouldRespectFitWidth(bool fitWidth) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectFitWidthChangingAfterRender() { var component = RenderComponent(); @@ -867,7 +867,7 @@ public void BitStackShouldRespectFitWidthChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -883,7 +883,7 @@ public void BitStackShouldRespectFitSize(bool fitSize) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStackShouldRespectFitSizeChangingAfterRender() { var component = RenderComponent(); diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Sticky/BitStickyHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Sticky/BitStickyHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Sticky/BitStickyHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Sticky/BitStickyHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Sticky/BitStickyTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Sticky/BitStickyTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Sticky/BitStickyTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Sticky/BitStickyTests.cs index aa3bf07139..a9ab4e8fb8 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Sticky/BitStickyTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Sticky/BitStickyTests.cs @@ -6,7 +6,7 @@ namespace Bit.BlazorUI.Tests.Components.Utilities.Sticky; [TestClass] public class BitStickyTests : BunitTestContext { - [DataTestMethod] + [TestMethod] public void BitStickyShouldRenderExpectedElement() { var component = RenderComponent(); @@ -14,7 +14,7 @@ public void BitStickyShouldRenderExpectedElement() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -30,7 +30,7 @@ public void BitStickyShouldRespectIsEnabled(bool isEnabled) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStickyShouldRespectIsEnabledChangingAfterRender() { var component = RenderComponent(); @@ -45,7 +45,7 @@ public void BitStickyShouldRespectIsEnabledChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("font-size: 14px; color: red;"), DataRow("padding: 1rem;"), DataRow(null) @@ -67,7 +67,7 @@ public void BitStickyShouldRespectStyle(string style) } } - [DataTestMethod] + [TestMethod] public void BitStickyShouldRespectStyleChangingAfterRender() { var component = RenderComponent(); @@ -83,7 +83,7 @@ public void BitStickyShouldRespectStyleChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("test-class"), DataRow(null) ] @@ -99,7 +99,7 @@ public void BitStickyShouldRespectClass(string @class) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStickyShouldRespectClassChangingAfterRender() { var component = RenderComponent(); @@ -116,7 +116,7 @@ public void BitStickyShouldRespectClassChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("test-id"), DataRow(null) ] @@ -132,7 +132,7 @@ public void BitStickyShouldRespectId(string id) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitDir.Rtl), DataRow(BitDir.Ltr), DataRow(BitDir.Auto), @@ -156,7 +156,7 @@ public void BitStickyShouldRespectDir(BitDir? dir) } } - [DataTestMethod] + [TestMethod] public void BitStickyShouldRespectDirChangingAfterRender() { var component = RenderComponent(); @@ -171,7 +171,7 @@ public void BitStickyShouldRespectDirChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitVisibility.Visible), DataRow(BitVisibility.Collapsed), DataRow(BitVisibility.Hidden) @@ -197,7 +197,7 @@ public void BitStickyShouldRespectVisibility(BitVisibility visibility) } } - [DataTestMethod] + [TestMethod] public void BitStickyShouldRespectVisibilityChangingAfterRender() { var component = RenderComponent(); @@ -212,7 +212,7 @@ public void BitStickyShouldRespectVisibilityChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("Bit Blazor UI"), DataRow(null) ] @@ -233,7 +233,7 @@ public void BitStickyShouldRespectAriaLabel(string ariaLabel) } } - [DataTestMethod, + [TestMethod, DataRow("Bit Blazor UI"), DataRow("Bit Blazor UI"), DataRow(null) @@ -248,7 +248,7 @@ public void BitStickyShouldRespectChildContent(string childContent) component.MarkupMatches(@$"
{childContent}"); } - [DataTestMethod] + [TestMethod] public void BitStickyShouldRespectHtmlAttributes() { var component = RenderComponent(); @@ -256,7 +256,7 @@ public void BitStickyShouldRespectHtmlAttributes() component.MarkupMatches(@"
I'm a sticky
"); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(""), DataRow("14px"), @@ -279,7 +279,7 @@ public void BitStickyShouldRespectTop(string top) } } - [DataTestMethod] + [TestMethod] public void BitStickyShouldRespectTopChangingAfterRender() { var component = RenderComponent(); @@ -296,7 +296,7 @@ public void BitStickyShouldRespectTopChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(""), DataRow("14px"), @@ -319,7 +319,7 @@ public void BitStickyShouldRespectBottom(string bottom) } } - [DataTestMethod] + [TestMethod] public void BitStickyShouldRespectBottomChangingAfterRender() { var component = RenderComponent(); @@ -336,7 +336,7 @@ public void BitStickyShouldRespectBottomChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(""), DataRow("14px"), @@ -359,7 +359,7 @@ public void BitStickyShouldRespectLeft(string left) } } - [DataTestMethod] + [TestMethod] public void BitStickyShouldRespectLeftChangingAfterRender() { var component = RenderComponent(); @@ -376,7 +376,7 @@ public void BitStickyShouldRespectLeftChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(""), DataRow("14px"), @@ -399,7 +399,7 @@ public void BitStickyShouldRespectRight(string right) } } - [DataTestMethod] + [TestMethod] public void BitStickyShouldRespectRightChangingAfterRender() { var component = RenderComponent(); @@ -416,7 +416,7 @@ public void BitStickyShouldRespectRightChangingAfterRender() component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow("14px", "15px", "16px", "17px"), DataRow("1.5rem", "2.5rem", "3.5rem", "4.5rem") ] @@ -440,7 +440,7 @@ public void BitStickyShouldRespectTopBottomLeftRight(string top, string bottom, } } - [DataTestMethod, + [TestMethod, DataRow(null), DataRow(BitStickyPosition.Top), DataRow(BitStickyPosition.Bottom), @@ -470,7 +470,7 @@ public void BitStickyShouldRespectPosition(BitStickyPosition? position) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitStickyShouldRespectPositionChangingAfterRender() { var component = RenderComponent(); diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/SwipeTrap/BitSwipeTrapTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/SwipeTrap/BitSwipeTrapTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/SwipeTrap/BitSwipeTrapTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/SwipeTrap/BitSwipeTrapTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Text/BitTextHtmlAttributesTest.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Text/BitTextHtmlAttributesTest.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Text/BitTextHtmlAttributesTest.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Text/BitTextHtmlAttributesTest.razor diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Text/BitTextTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Text/BitTextTests.cs similarity index 96% rename from src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Text/BitTextTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Text/BitTextTests.cs index dccf6534bc..0a766dec1f 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Text/BitTextTests.cs +++ b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Utilities/Text/BitTextTests.cs @@ -27,7 +27,7 @@ public class BitTextTests : BunitTestContext { BitTypography.Subtitle2, "h6" } }; - [DataTestMethod] + [TestMethod] public void BitTextShouldRenderExpectedElement() { var component = RenderComponent(); @@ -35,7 +35,7 @@ public void BitTextShouldRenderExpectedElement() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitTypography.H1), DataRow(BitTypography.H2), DataRow(BitTypography.H3), @@ -65,7 +65,7 @@ public void BitTextShouldRespectVariant(BitTypography variant) component.MarkupMatches(@$"<{el} class=""bit-txt {cssClass}"" id:ignore>"); } - [DataTestMethod, + [TestMethod, DataRow("h1"), DataRow("div"), DataRow(null) @@ -84,7 +84,7 @@ public void BitTextShouldRespectElement(string element) } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -100,7 +100,7 @@ public void BitTextShouldRespectNoWrap(bool noWrap) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitTextShouldRespectNoWrapChangingAfterRender() { var component = RenderComponent(); @@ -115,7 +115,7 @@ public void BitTextShouldRespectNoWrapChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -131,7 +131,7 @@ public void BitTextShouldRespectGutter(bool gutter) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitTextShouldRespectGutterChangingAfterRender() { var component = RenderComponent(); @@ -146,7 +146,7 @@ public void BitTextShouldRespectGutterChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(true), DataRow(false) ] @@ -162,7 +162,7 @@ public void BitTextShouldRespectIsEnabled(bool isEnabled) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitTextShouldRespectIsEnabledChangingAfterRender() { var component = RenderComponent(); @@ -177,7 +177,7 @@ public void BitTextShouldRespectIsEnabledChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("font-size: 14px; color: red;"), DataRow("padding: 1rem;"), DataRow(null) @@ -199,7 +199,7 @@ public void BitTextShouldRespectStyle(string style) } } - [DataTestMethod] + [TestMethod] public void BitTextShouldRespectStyleChangingAfterRender() { var component = RenderComponent(); @@ -215,7 +215,7 @@ public void BitTextShouldRespectStyleChangingAfterRender() } - [DataTestMethod, + [TestMethod, DataRow("test-class"), DataRow(null) ] @@ -231,7 +231,7 @@ public void BitTextShouldRespectClass(string @class) component.MarkupMatches(@$"
"); } - [DataTestMethod] + [TestMethod] public void BitTextShouldRespectClassChangingAfterRender() { var component = RenderComponent(); @@ -246,7 +246,7 @@ public void BitTextShouldRespectClassChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("test-id"), DataRow(null) ] @@ -262,7 +262,7 @@ public void BitTextShouldRespectId(string id) component.MarkupMatches(@$"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitDir.Rtl), DataRow(BitDir.Ltr), DataRow(BitDir.Auto), @@ -286,7 +286,7 @@ public void BitTextShouldRespectDir(BitDir? dir) } } - [DataTestMethod] + [TestMethod] public void BitTextShouldRespectDirChangingAfterRender() { var component = RenderComponent(); @@ -301,7 +301,7 @@ public void BitTextShouldRespectDirChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow(BitVisibility.Visible), DataRow(BitVisibility.Collapsed), DataRow(BitVisibility.Hidden) @@ -327,7 +327,7 @@ public void BitTextShouldRespectVisibility(BitVisibility visibility) } } - [DataTestMethod] + [TestMethod] public void BitTextShouldRespectVisibilityChangingAfterRender() { var component = RenderComponent(); @@ -342,7 +342,7 @@ public void BitTextShouldRespectVisibilityChangingAfterRender() component.MarkupMatches(@"
"); } - [DataTestMethod, + [TestMethod, DataRow("Bit Blazor UI"), DataRow(null) ] @@ -363,7 +363,7 @@ public void BitTextShouldRespectAriaLabel(string ariaLabel) } } - [DataTestMethod, + [TestMethod, DataRow("Bit Blazor UI"), DataRow("Bit Blazor UI"), DataRow(null) @@ -378,7 +378,7 @@ public void BitTextShouldRespectChildContent(string childContent) component.MarkupMatches(@$"
{childContent}
"); } - [DataTestMethod] + [TestMethod] public void BitTextShouldRespectHtmlAttributes() { var component = RenderComponent(); diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/TestJsRuntime.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/TestJsRuntime.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/TestJsRuntime.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/TestJsRuntime.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Utils/Params/BitCascadingValueProviderTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Params/BitCascadingValueProviderTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Utils/Params/BitCascadingValueProviderTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Params/BitCascadingValueProviderTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Utils/Params/BitParamsTests.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Params/BitParamsTests.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Utils/Params/BitParamsTests.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Params/BitParamsTests.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Utils/Params/CascadingConsumer.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Params/CascadingConsumer.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Utils/Params/CascadingConsumer.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Params/CascadingConsumer.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Utils/Params/FakeParamsA.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Params/FakeParamsA.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Utils/Params/FakeParamsA.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Params/FakeParamsA.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Utils/Params/FakeParamsB.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Params/FakeParamsB.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Utils/Params/FakeParamsB.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Params/FakeParamsB.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Utils/Params/NullableConsumer.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Params/NullableConsumer.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Utils/Params/NullableConsumer.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Params/NullableConsumer.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Utils/Params/ParamsConsumer.cs b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Params/ParamsConsumer.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/Utils/Params/ParamsConsumer.cs rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Params/ParamsConsumer.cs diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/_Imports.razor b/src/BlazorUI/Tests/Bit.BlazorUI.Tests/_Imports.razor similarity index 100% rename from src/BlazorUI/Bit.BlazorUI.Tests/_Imports.razor rename to src/BlazorUI/Tests/Bit.BlazorUI.Tests/_Imports.razor diff --git a/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Bit.BlazorUI.Tests.Performance.TestHost.csproj b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Bit.BlazorUI.Tests.Performance.TestHost.csproj new file mode 100644 index 0000000000..cfe8abf82d --- /dev/null +++ b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Bit.BlazorUI.Tests.Performance.TestHost.csproj @@ -0,0 +1,19 @@ + + + + net10.0;net9.0;net8.0 + enable + enable + preview + + + + + + + + + + + + diff --git a/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Components/App.razor b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Components/App.razor new file mode 100644 index 0000000000..5f7fc81432 --- /dev/null +++ b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Components/App.razor @@ -0,0 +1,21 @@ +@using Microsoft.AspNetCore.Components.Web + + + + + + + + + + + + + + + + + + + + diff --git a/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Components/Pages/BitActionButtonPerf.razor b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Components/Pages/BitActionButtonPerf.razor new file mode 100644 index 0000000000..bb03e5fc6c --- /dev/null +++ b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Components/Pages/BitActionButtonPerf.razor @@ -0,0 +1,108 @@ +@page "/perf/action-button" +@page "/perf/action-button/{Count:int}" + +BitActionButton Performance Test + +
+

BitActionButton Performance Test

+
+ + + + + +
+
+

Render Time: @RenderTimeMs ms

+

Re-render Time: @ReRenderTimeMs ms

+

Component Count: @RenderedCount

+

Status: @Status

+
+
+ +
+ @if (_isRendered) + { + @for (int i = 0; i < RenderedCount; i++) + { + var index = i; + + Button @index + + } + } +
+ +@code { + [Parameter] + public int Count { get; set; } = 100; + + private int RenderedCount { get; set; } + private double RenderTimeMs { get; set; } + private double ReRenderTimeMs { get; set; } + private string Status { get; set; } = "Ready"; + private bool _isRendered; + private bool _isEnabled = true; + private System.Diagnostics.Stopwatch _stopwatch = new(); + + protected override void OnInitialized() + { + if (Count > 0) + { + // Auto-render if count is provided via URL + } + } + + private void Render() + { + _stopwatch.Restart(); + _isRendered = true; + RenderedCount = Count; + Status = "Rendering..."; + } + + protected override void OnAfterRender(bool firstRender) + { + if (_stopwatch.IsRunning && _isRendered) + { + _stopwatch.Stop(); + if (Status == "Rendering...") + { + RenderTimeMs = _stopwatch.Elapsed.TotalMilliseconds; + Status = "Rendered"; + } + else if (Status == "Re-rendering...") + { + ReRenderTimeMs = _stopwatch.Elapsed.TotalMilliseconds; + Status = "Re-rendered"; + } + StateHasChanged(); + } + } + + private void Clear() + { + _isRendered = false; + RenderedCount = 0; + RenderTimeMs = 0; + ReRenderTimeMs = 0; + Status = "Cleared"; + } + + private void ReRender() + { + if (!_isRendered) return; + + _stopwatch.Restart(); + _isEnabled = !_isEnabled; + Status = "Re-rendering..."; + } + + private void OnButtonClick(int index) + { + // Click handler for testing + } +} diff --git a/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Components/Pages/Home.razor b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Components/Pages/Home.razor new file mode 100644 index 0000000000..44501562cc --- /dev/null +++ b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Components/Pages/Home.razor @@ -0,0 +1,33 @@ +@page "/" + +Performance Test Host + +
+

Bit.BlazorUI Performance Test Host

+

This application hosts pages for browser-based performance testing of Bit.BlazorUI components.

+ +

Available Test Pages

+ + +

API Endpoints

+

For automated testing, the following metrics are exposed via DOM elements:

+
    +
  • #render-time - Render time in milliseconds
  • +
  • #rerender-time - Re-render time in milliseconds
  • +
  • #component-count - Number of components rendered
  • +
  • #status - Current status (Ready, Rendering, Rendered, etc.)
  • +
+ +

Test Controls

+
    +
  • #btn-render - Button to trigger render
  • +
  • #btn-clear - Button to clear components
  • +
  • #btn-rerender - Button to trigger re-render
  • +
+
diff --git a/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Components/Routes.razor b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Components/Routes.razor new file mode 100644 index 0000000000..73389eac26 --- /dev/null +++ b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Components/Routes.razor @@ -0,0 +1,9 @@ + + + + + + Not found +

Sorry, there's nothing at this address.

+
+
diff --git a/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Program.cs b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Program.cs new file mode 100644 index 0000000000..b9a665575d --- /dev/null +++ b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Program.cs @@ -0,0 +1,26 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. +builder.Services.AddRazorComponents() + .AddInteractiveServerComponents(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (!app.Environment.IsDevelopment()) +{ + app.UseExceptionHandler("/Error"); + app.UseHsts(); +} + +app.UseHttpsRedirection(); +app.UseStaticFiles(); +app.UseAntiforgery(); + +app.MapRazorComponents() + .AddInteractiveServerRenderMode(); + +app.Run(); + +// Make Program class accessible for WebApplicationFactory +public partial class Program { } diff --git a/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Properties/launchSettings.json b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Properties/launchSettings.json new file mode 100644 index 0000000000..a5493279e1 --- /dev/null +++ b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Bit.BlazorUI.Tests.Performance.TestHost": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:54289;http://localhost:54290" + } + } +} \ No newline at end of file diff --git a/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/_Imports.razor b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/_Imports.razor new file mode 100644 index 0000000000..7c4fe2f432 --- /dev/null +++ b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/_Imports.razor @@ -0,0 +1,9 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.JSInterop +@using Bit.BlazorUI +@using Bit.BlazorUI.Tests.Performance.TestHost.Components diff --git a/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance/.runsettings b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance/.runsettings new file mode 100644 index 0000000000..b2f6ce2918 --- /dev/null +++ b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance/.runsettings @@ -0,0 +1,15 @@ + + + + + chromium + + + true + + ["--enable-precise-memory-info"] + + + 30000 + + diff --git a/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance/Bit.BlazorUI.Tests.Performance.csproj b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance/Bit.BlazorUI.Tests.Performance.csproj new file mode 100644 index 0000000000..972a6c493f --- /dev/null +++ b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance/Bit.BlazorUI.Tests.Performance.csproj @@ -0,0 +1,28 @@ + + + + + + net10.0;net9.0;net8.0 + false + 14.0 + enable + Major + true + + + + + + + + + + + + + + + + + diff --git a/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance/BitActionButtonBrowserTests.cs b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance/BitActionButtonBrowserTests.cs new file mode 100644 index 0000000000..5611d23117 --- /dev/null +++ b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance/BitActionButtonBrowserTests.cs @@ -0,0 +1,393 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Bit.BlazorUI.Tests.Performance; + +/// +/// Browser-based performance tests for BitActionButton component using Playwright. +/// These tests measure actual rendering performance in a real browser environment. +/// +[TestClass] +[TestCategory("Performance")] +[TestCategory("Browser")] +[Ignore("Browser tests must be run explicitly. Use: dotnet test --filter FullyQualifiedName~BitActionButtonBrowserTests")] +public class BitActionButtonBrowserTests : PerformanceTestBase +{ + #region Initial Render Performance Tests + + [TestMethod] + [TestCategory("InitialRender")] + public async Task BitActionButton_InitialRender_10Components() + { + await TestInitialRender(10, Thresholds.Render10Components); + } + + [TestMethod] + [TestCategory("InitialRender")] + public async Task BitActionButton_InitialRender_100Components() + { + await TestInitialRender(100, Thresholds.Render100Components); + } + + [TestMethod] + [TestCategory("InitialRender")] + public async Task BitActionButton_InitialRender_500Components() + { + await TestInitialRender(500, Thresholds.Render500Components); + } + + [TestMethod] + [TestCategory("InitialRender")] + public async Task BitActionButton_InitialRender_1000Components() + { + await TestInitialRender(1000, Thresholds.Render1000Components); + } + + private async Task TestInitialRender(int count, double threshold) + { + // Navigate to the performance test page + await Page.GotoAsync($"{BaseUrl}/perf/action-button/{count}"); + await Page.WaitForLoadStateAsync(LoadState.NetworkIdle); + + // Click the render button + await Page.Locator("#btn-render").ClickAsync(); + + // Wait for rendering to complete + await WaitForRenderComplete(); + + // Get and validate the render time + var renderTime = await GetRenderTime(); + var componentCount = await GetComponentCount(); + + Console.WriteLine($"Initial Render - {count} components: {renderTime:F2}ms"); + + Assert.AreEqual(count, componentCount, $"Expected {count} components, but got {componentCount}"); + AssertWithinThreshold(renderTime, threshold, $"Initial render time for {count} components"); + } + + #endregion + + #region Re-render Performance Tests + + [TestMethod] + [TestCategory("ReRender")] + public async Task BitActionButton_ReRender_10Components() + { + await TestReRender(10, Thresholds.ReRender10Components); + } + + [TestMethod] + [TestCategory("ReRender")] + public async Task BitActionButton_ReRender_100Components() + { + await TestReRender(100, Thresholds.ReRender100Components); + } + + [TestMethod] + [TestCategory("ReRender")] + public async Task BitActionButton_ReRender_500Components() + { + await TestReRender(500, Thresholds.ReRender500Components); + } + + [TestMethod] + [TestCategory("ReRender")] + public async Task BitActionButton_ReRender_1000Components() + { + await TestReRender(1000, Thresholds.ReRender1000Components); + } + + private async Task TestReRender(int count, double threshold) + { + // Navigate to the performance test page + await Page.GotoAsync($"{BaseUrl}/perf/action-button/{count}"); + await Page.WaitForLoadStateAsync(LoadState.NetworkIdle); + + // First, render the components + await Page.Locator("#btn-render").ClickAsync(); + await WaitForRenderComplete(); + + // Now trigger a re-render + await Page.Locator("#btn-rerender").ClickAsync(); + await WaitForReRenderComplete(); + + // Get and validate the re-render time + var reRenderTime = await GetReRenderTime(); + + Console.WriteLine($"Re-render - {count} components: {reRenderTime:F2}ms"); + + AssertWithinThreshold(reRenderTime, threshold, $"Re-render time for {count} components"); + } + + #endregion + + #region Memory Usage Tests + + [TestMethod] + [TestCategory("Memory")] + public async Task BitActionButton_Memory_10Components() + { + await TestMemoryUsage(10, Thresholds.Memory10Components); + } + + [TestMethod] + [TestCategory("Memory")] + public async Task BitActionButton_Memory_100Components() + { + await TestMemoryUsage(100, Thresholds.Memory100Components); + } + + [TestMethod] + [TestCategory("Memory")] + public async Task BitActionButton_Memory_500Components() + { + await TestMemoryUsage(500, Thresholds.Memory500Components); + } + + [TestMethod] + [TestCategory("Memory")] + public async Task BitActionButton_Memory_1000Components() + { + await TestMemoryUsage(1000, Thresholds.Memory1000Components); + } + + private async Task TestMemoryUsage(int count, double threshold) + { + // Navigate to the performance test page + await Page.GotoAsync($"{BaseUrl}/perf/action-button/{count}"); + await Page.WaitForLoadStateAsync(LoadState.NetworkIdle); + + // Get baseline memory + var baselineMemory = await GetMemoryUsageMB(); + + // Render the components + await Page.Locator("#btn-render").ClickAsync(); + await WaitForRenderComplete(); + + // Get memory after render + var afterRenderMemory = await GetMemoryUsageMB(); + var memoryIncrease = afterRenderMemory - baselineMemory; + + Console.WriteLine($"Memory - {count} components: Baseline={baselineMemory:F2}MB, After={afterRenderMemory:F2}MB, Increase={memoryIncrease:F2}MB"); + + // Note: Memory API may not be available in all browsers + if (afterRenderMemory > 0) + { + AssertWithinThreshold(afterRenderMemory, threshold, $"Memory usage for {count} components"); + } + else + { + Console.WriteLine("Memory measurement not available in this browser"); + } + } + + #endregion + + #region Scalability Tests + + [TestMethod] + [TestCategory("Scalability")] + public async Task BitActionButton_ScalabilityTest_LinearGrowth() + { + var counts = new[] { 10, 50, 100, 200, 500 }; + var renderTimes = new List<(int Count, double Time)>(); + + foreach (var count in counts) + { + await Page.GotoAsync($"{BaseUrl}/perf/action-button/{count}"); + await Page.WaitForLoadStateAsync(LoadState.NetworkIdle); + + await Page.Locator("#btn-render").ClickAsync(); + await WaitForRenderComplete(); + + var renderTime = await GetRenderTime(); + renderTimes.Add((count, renderTime)); + + Console.WriteLine($"Scalability - {count} components: {renderTime:F2}ms"); + + // Clear for next iteration + await Page.Locator("#btn-clear").ClickAsync(); + await Task.Delay(100); + } + + // Verify roughly linear scaling (not exponential) + // Time per component should remain relatively stable + var timePerComponent = renderTimes.Select(r => r.Time / r.Count).ToList(); + var avgTimePerComponent = timePerComponent.Average(); + var maxDeviation = timePerComponent.Max() / avgTimePerComponent; + + Console.WriteLine($"Average time per component: {avgTimePerComponent:F4}ms"); + Console.WriteLine($"Max deviation ratio: {maxDeviation:F2}x"); + + // Allow up to 5x deviation (accounting for setup overhead with smaller counts) + if (maxDeviation > 5) + { + Assert.Fail($"Non-linear scaling detected. Max deviation: {maxDeviation:F2}x from average"); + } + } + + [TestMethod] + [TestCategory("Scalability")] + public async Task BitActionButton_MultipleReRendersPerformance() + { + const int componentCount = 100; + const int reRenderCount = 5; + + await Page.GotoAsync($"{BaseUrl}/perf/action-button/{componentCount}"); + await Page.WaitForLoadStateAsync(LoadState.NetworkIdle); + + // Initial render + await Page.Locator("#btn-render").ClickAsync(); + await WaitForRenderComplete(); + + var reRenderTimes = new List(); + + // Multiple re-renders + for (int i = 0; i < reRenderCount; i++) + { + await Page.Locator("#btn-rerender").ClickAsync(); + await WaitForReRenderComplete(); + + var reRenderTime = await GetReRenderTime(); + reRenderTimes.Add(reRenderTime); + + Console.WriteLine($"Re-render {i + 1}: {reRenderTime:F2}ms"); + } + + // Re-render times should be consistent + var avgReRenderTime = reRenderTimes.Average(); + var maxReRenderTime = reRenderTimes.Max(); + + Console.WriteLine($"Average re-render time: {avgReRenderTime:F2}ms"); + Console.WriteLine($"Max re-render time: {maxReRenderTime:F2}ms"); + + // Max should not be more than 3x average (no degradation) + if (maxReRenderTime > avgReRenderTime * 3) + { + Assert.Fail($"Re-render performance degradation detected. Max ({maxReRenderTime:F2}ms) > 3x average ({avgReRenderTime:F2}ms)"); + } + } + + #endregion + + #region Stress Tests + + [TestMethod] + [TestCategory("Stress")] + public async Task BitActionButton_RapidRenderClearCycles() + { + const int componentCount = 100; + const int cycleCount = 5; + + await Page.GotoAsync($"{BaseUrl}/perf/action-button/{componentCount}"); + await Page.WaitForLoadStateAsync(LoadState.NetworkIdle); + + var cycleTimes = new List(); + + for (int i = 0; i < cycleCount; i++) + { + var cycleStart = DateTime.Now; + + // Render + await Page.Locator("#btn-render").ClickAsync(); + await WaitForRenderComplete(); + + // Clear + await Page.Locator("#btn-clear").ClickAsync(); + await Page.WaitForFunctionAsync("() => document.getElementById('status')?.innerText === 'Cleared'"); + + var cycleTime = (DateTime.Now - cycleStart).TotalMilliseconds; + cycleTimes.Add(cycleTime); + + Console.WriteLine($"Cycle {i + 1}: {cycleTime:F2}ms"); + } + + var avgCycleTime = cycleTimes.Average(); + Console.WriteLine($"Average cycle time: {avgCycleTime:F2}ms"); + + // Should complete within reasonable time + AssertWithinThreshold(avgCycleTime, 2000, "Average render/clear cycle time"); + } + + [TestMethod] + [TestCategory("Stress")] + public async Task BitActionButton_LargeScaleRender_2000Components() + { + const int count = 2000; + const double threshold = 10000; // 10 seconds for 2000 components + + await Page.GotoAsync($"{BaseUrl}/perf/action-button"); + await Page.WaitForLoadStateAsync(LoadState.NetworkIdle); + + // Set the count manually + await Page.Locator("input[type='number']").FillAsync(count.ToString()); + + // Render + await Page.Locator("#btn-render").ClickAsync(); + await WaitForRenderComplete(); + + var renderTime = await GetRenderTime(); + var componentCount = await GetComponentCount(); + + Console.WriteLine($"Large scale render - {count} components: {renderTime:F2}ms"); + + Assert.AreEqual(count, componentCount, $"Expected {count} components, but got {componentCount}"); + AssertWithinThreshold(renderTime, threshold, $"Large scale render time for {count} components"); + } + + #endregion + + #region Visual Verification Tests + + [TestMethod] + [TestCategory("Visual")] + public async Task BitActionButton_ComponentsRenderCorrectly() + { + const int count = 10; + + await Page.GotoAsync($"{BaseUrl}/perf/action-button/{count}"); + await Page.WaitForLoadStateAsync(LoadState.NetworkIdle); + + await Page.Locator("#btn-render").ClickAsync(); + await WaitForRenderComplete(); + + // Verify the buttons are actually rendered + var buttons = Page.Locator("#test-container .bit-acb"); + var buttonCount = await buttons.CountAsync(); + + Console.WriteLine($"Found {buttonCount} BitActionButton elements in DOM"); + + Assert.AreEqual(count, buttonCount, $"Expected {count} BitActionButton elements, but found {buttonCount}"); + } + + [TestMethod] + [TestCategory("Visual")] + public async Task BitActionButton_ToggleIsEnabled_UpdatesDOM() + { + const int count = 10; + + await Page.GotoAsync($"{BaseUrl}/perf/action-button/{count}"); + await Page.WaitForLoadStateAsync(LoadState.NetworkIdle); + + await Page.Locator("#btn-render").ClickAsync(); + await WaitForRenderComplete(); + + // Get initial state + var enabledButtons = await Page.Locator("#test-container .bit-acb:not(.bit-dis)").CountAsync(); + Console.WriteLine($"Enabled buttons before toggle: {enabledButtons}"); + + // Toggle IsEnabled + await Page.Locator("#btn-rerender").ClickAsync(); + await WaitForReRenderComplete(); + + // Get new state + var disabledButtons = await Page.Locator("#test-container .bit-acb.bit-dis").CountAsync(); + Console.WriteLine($"Disabled buttons after toggle: {disabledButtons}"); + + Assert.AreEqual(count, disabledButtons, "All buttons should be disabled after toggle"); + } + + #endregion +} diff --git a/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance/PerformanceTestBase.cs b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance/PerformanceTestBase.cs new file mode 100644 index 0000000000..203f3de828 --- /dev/null +++ b/src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance/PerformanceTestBase.cs @@ -0,0 +1,259 @@ +using System; +using System.Diagnostics; +using System.IO; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; + +namespace Bit.BlazorUI.Tests.Performance; + +/// +/// Base class for Playwright-based performance tests. +/// Manages the test host application lifecycle. +/// +public abstract class PerformanceTestBase : PageTest +{ + private static Process? _hostProcess; + private static readonly object _lock = new(); + private static int _testCount; + private static bool _isHostStarted; + + protected const string BaseUrl = "http://localhost:5280"; + protected const int DefaultTimeout = 30000; + + /// + /// Performance thresholds in milliseconds. + /// + protected static class Thresholds + { + // Initial render thresholds (ms) + public const double Render10Components = 500; + public const double Render100Components = 1000; + public const double Render500Components = 3000; + public const double Render1000Components = 5000; + + // Re-render thresholds (ms) + public const double ReRender10Components = 200; + public const double ReRender100Components = 500; + public const double ReRender500Components = 1500; + public const double ReRender1000Components = 3000; + + // Memory thresholds (MB) + public const double Memory10Components = 50; + public const double Memory100Components = 100; + public const double Memory500Components = 200; + public const double Memory1000Components = 400; + } + + [TestInitialize] + public async Task TestInitializeBase() + { + lock (_lock) + { + _testCount++; + if (!_isHostStarted) + { + StartTestHost(); + _isHostStarted = true; + } + } + + // Wait for page to be ready + await Page.GotoAsync(BaseUrl); + await Page.WaitForLoadStateAsync(LoadState.NetworkIdle); + } + + [TestCleanup] + public void TestCleanupBase() + { + lock (_lock) + { + _testCount--; + // Stop host when no more tests are running + if (_testCount == 0) + { + StopTestHost(); + } + } + } + + private static void StartTestHost() + { + var testHostPath = GetTestHostPath(); + + var startInfo = new ProcessStartInfo + { + FileName = "dotnet", + Arguments = $"run --project \"{testHostPath}\" --urls {BaseUrl}", + UseShellExecute = false, + CreateNoWindow = true, + RedirectStandardOutput = true, + RedirectStandardError = true + }; + + _hostProcess = Process.Start(startInfo); + + // Wait for the host to start + var maxWait = TimeSpan.FromSeconds(30); + var waited = TimeSpan.Zero; + var interval = TimeSpan.FromMilliseconds(500); + + using var httpClient = new HttpClient(); + while (waited < maxWait) + { + try + { + var response = httpClient.GetAsync(BaseUrl).Result; + if (response.IsSuccessStatusCode) + { + return; + } + } + catch + { + // Host not ready yet + } + + Thread.Sleep(interval); + waited += interval; + } + + throw new InvalidOperationException($"Test host failed to start within {maxWait.TotalSeconds} seconds"); + } + + private static void StopTestHost() + { + if (_hostProcess is not null && !_hostProcess.HasExited) + { + _hostProcess.Kill(entireProcessTree: true); + _hostProcess.Dispose(); + _hostProcess = null; + } + _isHostStarted = false; + } + + private static string GetTestHostPath() + { + // Navigate from test project to test host project + var currentDir = Directory.GetCurrentDirectory(); + + var path = Path.GetFullPath(Path.Combine(currentDir, "..", "Bit.BlazorUI.Tests.Performance.TestHost", "Bit.BlazorUI.Tests.Performance.TestHost.csproj")); + + return path; + + // Try to find the TestHost project + //var possiblePaths = new[] + //{ + // Path.Combine(currentDir, "..", "TestHost", "Bit.BlazorUI.Tests.Performance.TestHost.csproj"), + // Path.Combine(currentDir, "..", "..", "..", "..", "TestHost", "Bit.BlazorUI.Tests.Performance.TestHost.csproj"), + // Path.Combine(currentDir, "..", "..", "..", "..", "..", "TestHost", "Bit.BlazorUI.Tests.Performance.TestHost.csproj"), + //}; + + //foreach (var path in possiblePaths) + //{ + // var fullPath = Path.GetFullPath(path); + // if (File.Exists(fullPath)) + // { + // return fullPath; + // } + //} + + //// Fallback: search upward for the project + //var searchDir = currentDir; + //while (!string.IsNullOrEmpty(searchDir)) + //{ + // var testHostPath = Path.Combine(searchDir, "Performance", "TestHost", "Bit.BlazorUI.Tests.Performance.TestHost.csproj"); + // if (File.Exists(testHostPath)) + // { + // return testHostPath; + // } + + // var testsDir = Path.Combine(searchDir, "Bit.BlazorUI.Tests", "Performance", "TestHost", "Bit.BlazorUI.Tests.Performance.TestHost.csproj"); + // if (File.Exists(testsDir)) + // { + // return testsDir; + // } + + // searchDir = Path.GetDirectoryName(searchDir); + //} + + //throw new FileNotFoundException("Could not find Bit.BlazorUI.Tests.Performance.TestHost.csproj"); + } + + /// + /// Waits for the component rendering to complete. + /// + protected async Task WaitForRenderComplete() + { + await Page.WaitForFunctionAsync("() => document.getElementById('status')?.innerText === 'Rendered'", + new PageWaitForFunctionOptions { Timeout = DefaultTimeout }); + } + + /// + /// Waits for the re-render to complete. + /// + protected async Task WaitForReRenderComplete() + { + await Page.WaitForFunctionAsync("() => document.getElementById('status')?.innerText === 'Re-rendered'", + new PageWaitForFunctionOptions { Timeout = DefaultTimeout }); + } + + /// + /// Gets the render time from the page. + /// + protected async Task GetRenderTime() + { + var text = await Page.Locator("#render-time").TextContentAsync(); + return double.TryParse(text, out var value) ? value : 0; + } + + /// + /// Gets the re-render time from the page. + /// + protected async Task GetReRenderTime() + { + var text = await Page.Locator("#rerender-time").TextContentAsync(); + return double.TryParse(text, out var value) ? value : 0; + } + + /// + /// Gets the component count from the page. + /// + protected async Task GetComponentCount() + { + var text = await Page.Locator("#component-count").TextContentAsync(); + return int.TryParse(text, out var value) ? value : 0; + } + + /// + /// Gets the current memory usage in MB using browser Performance API. + /// + protected async Task GetMemoryUsageMB() + { + try + { + var result = await Page.EvaluateAsync(@"() => { + if (performance.memory) { + return performance.memory.usedJSHeapSize / (1024 * 1024); + } + return null; + }"); + return result ?? 0; + } + catch + { + return 0; + } + } + + /// + /// Asserts that a metric is within the threshold. + /// + protected static void AssertWithinThreshold(double actual, double threshold, string metricName) + { + if (actual > threshold) + { + Assert.Fail($"{metricName}: {actual:F2} exceeded threshold of {threshold:F2}"); + } + } +} diff --git a/src/BlazorUI/Tests/Performance/README.md b/src/BlazorUI/Tests/Performance/README.md new file mode 100644 index 0000000000..3b70a545ff --- /dev/null +++ b/src/BlazorUI/Tests/Performance/README.md @@ -0,0 +1,176 @@ +# Bit.BlazorUI Performance Tests + +This folder contains browser-based performance tests for Bit.BlazorUI components using Playwright. + +## Structure + +``` +Performance/ +├── Bit.BlazorUI.Tests.Performance.TestHost/ # Blazor Server application for hosting test pages +│ ├── Components/ +│ │ ├── App.razor +│ │ ├── Routes.razor +│ │ └── Pages/ +│ │ ├── Home.razor +│ │ └── BitActionButtonPerf.razor +│ ├── Program.cs +│ └── Bit.BlazorUI.Tests.Performance.TestHost.csproj +│ +├── Bit.BlazorUI.Tests.Performance/ # Playwright test projects +│ ├── PerformanceTestBase.cs # Base class with test infrastructure +│ ├── BitActionButtonBrowserTests.cs +│ └── Bit.BlazorUI.Tests.Performance.csproj +│ +└── README.md +``` + +## Prerequisites + +1. .NET 10.0 SDK +2. Playwright browsers installed + +## Setup + +### Install Playwright Browsers + +After building the Bit.BlazorUI.Tests.Performance project, install the required browsers: + +```bash +pwsh bin/Debug/net10.0/playwright.ps1 install +``` + +Or on Linux/macOS: + +```bash +./bin/Debug/net10.0/playwright.sh install +``` + +# Running Tests + +## Test Host + +The test host is a Blazor Server application that provides test pages for each component. + +### Running the Test Host Manually + +```bash +dotnet run --urls http://localhost:5280 -f net10.0 +``` + +Then navigate to: +- http://localhost:5280 - Home page with links to all test pages +- http://localhost:5280/perf/action-button - BitActionButton performance test +- http://localhost:5280/perf/action-button/100 - BitActionButton with 100 components + +### Test Page Controls + +Each test page exposes: +- `#btn-render` - Button to trigger initial render +- `#btn-clear` - Button to clear all components +- `#btn-rerender` - Button to trigger re-render + +Metrics are exposed via DOM elements: +- `#render-time` - Initial render time in milliseconds +- `#rerender-time` - Re-render time in milliseconds +- `#component-count` - Number of components rendered +- `#status` - Current status (Ready, Rendering, Rendered, etc.) + +## Performance Tests + +Run the following command in the `Bit.BlazorUI.Tests.Performance` folder: +```bash +dotnet test -f net10.0 --output detailed +``` + +### Run Specific Test Categories + +```bash +# Initial render tests only +dotnet test --filter "TestCategory=InitialRender" + +# Re-render tests only +dotnet test --filter "TestCategory=ReRender" + +# Memory tests only +dotnet test --filter "TestCategory=Memory" + +# Scalability tests only +dotnet test --filter "TestCategory=Scalability" + +# Stress tests only +dotnet test --filter "TestCategory=Stress" +``` + +### Run with Specific Browser + +```bash +dotnet test -- Playwright.BrowserName=firefox +dotnet test -- Playwright.BrowserName=webkit +``` + +### Run in Headed Mode (for debugging) + +```bash +dotnet test -- Playwright.LaunchOptions.Headless=false +``` + +## Performance Thresholds + +Default thresholds are defined in `PerformanceTestBase.Thresholds`: + +| Component Count | Initial Render | Re-render | Memory | +|-----------------|----------------|-----------|--------| +| 10 | 500ms | 200ms | 50MB | +| 100 | 1000ms | 500ms | 100MB | +| 500 | 3000ms | 1500ms | 200MB | +| 1000 | 5000ms | 3000ms | 400MB | + +These thresholds are intentionally generous to account for CI/CD environment variations. +Adjust as needed based on your performance requirements. + +## Troubleshooting + +### Test Host Doesn't Start + +1. Check if port 5280 is available +2. Verify the TestHost project builds successfully +3. Check the test output for error messages + +### Memory Tests Show + +Memory API (`performance.memory`) is only available in Chromium-based browsers. +Run tests with Chromium browser for memory measurements. + +### Tests Timeout + +1. Increase timeout in `.runsettings` +2. Check if the test host is starting properly +3. Reduce component count for initial debugging + +### Playwright Browsers Not Found + +Run the Playwright install script: +```bash +pwsh bin/Debug/net10.0/playwright.ps1 install +``` + +## Adding Tests for New Components + +1. Create a new test page in `Bit.BlazorUI.Tests.Performance.TestHost/Components/Pages/`: + ```razor + @page "/perf/your-component" + @page "/perf/your-component/{Count:int}" + + + ``` + +2. Create a new test class in `Bit.BlazorUI.Tests.Performance` project: + ```csharp + [TestClass] + [TestCategory("Performance")] + [TestCategory("Browser")] + public class YourComponentBrowserTests : PerformanceTestBase + { + // Follow the pattern in BitActionButtonBrowserTests.cs + } + ``` diff --git a/src/BlazorUI/temp_restore_razor.txt b/src/BlazorUI/temp_restore_razor.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/bit.ci.release.slnx b/src/bit.ci.release.slnx index 2aaf33feb5..e1213bfe7f 100644 --- a/src/bit.ci.release.slnx +++ b/src/bit.ci.release.slnx @@ -31,12 +31,12 @@ + - - +