Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/bit.ci.BlazorUI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions src/Bit.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@
<Folder Name="/BlazorUI/">
<File Path="BlazorUI/Clean.bat" />
<File Path="BlazorUI/README.md" />
<Project Path="BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj" />
<Project Path="BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj" />
<Project Path="BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj" />
<Project Path="BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj" />
<Project Path="BlazorUI/Bit.BlazorUI.SourceGenerators/Bit.BlazorUI.SourceGenerators.csproj" />
<Project Path="BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj" />
<Project Path="BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj" />
<Project Path="BlazorUI/Tests/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj" />
</Folder>
<Folder Name="/BlazorUI/Demo/">
<File Path="BlazorUI/Demo/.gitignore" />
Expand Down
4 changes: 2 additions & 2 deletions src/BlazorUI/Bit.BlazorUI.Web.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 8 additions & 1 deletion src/BlazorUI/Bit.BlazorUI.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,17 @@
<Project Path="Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj" />
<Project Path="Demo/Client/Bit.BlazorUI.Demo.Client.Windows/Bit.BlazorUI.Demo.Client.Windows.csproj" />
</Folder>
<Folder Name="/Tests/">
<Project Path="Tests/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj" />
</Folder>
<Folder Name="/Tests/Performance/">
<File Path="Tests/Performance/README.md" />
<Project Path="Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Bit.BlazorUI.Tests.Performance.TestHost.csproj" />
<Project Path="Tests/Performance/Bit.BlazorUI.Tests.Performance/Bit.BlazorUI.Tests.Performance.csproj" />
</Folder>
<Project Path="Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj" />
<Project Path="Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj" />
<Project Path="Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj" />
<Project Path="Bit.BlazorUI.SourceGenerators/Bit.BlazorUI.SourceGenerators.csproj" />
<Project Path="Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj" />
<Project Path="Bit.BlazorUI/Bit.BlazorUI.csproj" />
</Solution>
Binary file removed src/BlazorUI/BitActionButtonDemo.restore
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
</PropertyGroup>

<ItemGroup>
<Compile Include="..\Bit.BlazorUI\Components\Inputs\ColorPicker\BitInternalColor.cs" Link="Components\Inputs\ColorPicker\BitInternalColor.cs" />
<Compile Include="..\Bit.BlazorUI\Extensions\EnumExtensions.cs" Link="Extensions\EnumExtensions.cs" />
<Compile Include="..\Bit.BlazorUI\Extensions\StringExtensions.cs" Link="Extensions\StringExtensions.cs" />
<Compile Include="..\..\Bit.BlazorUI\Components\Inputs\ColorPicker\BitInternalColor.cs" Link="Components\Inputs\ColorPicker\BitInternalColor.cs" />
<Compile Include="..\..\Bit.BlazorUI\Extensions\EnumExtensions.cs" Link="Extensions\EnumExtensions.cs" />
<Compile Include="..\..\Bit.BlazorUI\Extensions\StringExtensions.cs" Link="Extensions\StringExtensions.cs" />
</ItemGroup>

<ItemGroup>
Expand All @@ -23,8 +23,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Bit.BlazorUI\Bit.BlazorUI.csproj" />
<ProjectReference Include="..\Bit.BlazorUI.Extras\Bit.BlazorUI.Extras.csproj" />
<ProjectReference Include="..\..\Bit.BlazorUI\Bit.BlazorUI.csproj" />
<ProjectReference Include="..\..\Bit.BlazorUI.Extras\Bit.BlazorUI.Extras.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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),
Expand All @@ -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"),
Expand Down Expand Up @@ -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<BitButton>(parameters =>
Expand All @@ -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<BitButton>(parameters =>
Expand All @@ -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<BitButton>(parameters =>
Expand All @@ -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)
Expand Down Expand Up @@ -206,15 +206,14 @@ public void BitButtonButtonStateNotOverriddenInEditContextTest()
Assert.AreEqual("button", bitButton.GetAttribute("type"));
}

[DataTestMethod,
[TestMethod,
DataRow(BitColor.Info),
DataRow(BitColor.Success),
DataRow(BitColor.Warning),
DataRow(BitColor.SevereWarning),
DataRow(BitColor.Error),
DataRow(null),
]
[TestMethod]
public void BitColorOfButtonTest(BitColor? color)
{
var com = RenderComponent<BitButton>(parameters =>
Expand Down Expand Up @@ -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<BitButton>(parameters =>
Expand Down Expand Up @@ -284,7 +282,7 @@ public void BitSizeOfButtonTest(BitSize? size)
}
}

[DataTestMethod,
[TestMethod,
DataRow(true),
DataRow(false),
]
Expand All @@ -310,7 +308,7 @@ public void BitButtonLoadingContentTest(bool isLoading)
}
}

[DataTestMethod,
[TestMethod,
DataRow(BitLabelPosition.Top),
DataRow(BitLabelPosition.Top),
DataRow(BitLabelPosition.Top),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class BitMenuButtonTests : BunitTestContext
}
};

[DataTestMethod,
[TestMethod,
DataRow(true, BitVariant.Fill),
DataRow(true, BitVariant.Outline),
DataRow(false, BitVariant.Fill),
Expand Down Expand Up @@ -61,7 +61,7 @@ public void BitMenuButtonTest(bool isEnabled, BitVariant variant)
}
}

[DataTestMethod,
[TestMethod,
DataRow("A", "Add"),
DataRow("B", "Edit")
]
Expand All @@ -85,7 +85,7 @@ public void BitMenuButtonShouldHaveTextAndIcon(string text, string iconName)
Assert.AreEqual(text, menuButtonText.TextContent);
}

[DataTestMethod,
[TestMethod,
DataRow("A", "Add"),
DataRow("B", "Edit")
]
Expand All @@ -111,7 +111,7 @@ public void BitMenuButtonShouldHaveTextAndIconInItem(string itemText, string ite
Assert.IsTrue(menuButtonItemIcon.ClassList.Contains(itemIconNameClass));
}

[DataTestMethod,
[TestMethod,
DataRow(true),
DataRow(false)
]
Expand Down Expand Up @@ -142,7 +142,7 @@ public void BitMenuButtonShouldBeItemClickIfEnabled(bool itemIsEnabled)
}
}

[DataTestMethod,
[TestMethod,
DataRow(true),
DataRow(false)
]
Expand All @@ -169,7 +169,7 @@ public void BitMenuButtonOpenMenu(bool isEnabled)
}
}

[DataTestMethod,
[TestMethod,
DataRow(true),
DataRow(false)
]
Expand Down Expand Up @@ -200,7 +200,7 @@ public void BitMenuButtonStickyTest(bool isSticky)
}
}

[DataTestMethod,
[TestMethod,
DataRow(true)
]
public void BitMenuButtonSplitTest(bool isSplit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -43,7 +43,7 @@ public void BitToggleButtonShouldHaveCorrectLabelAndIconAndTitle(bool isChecked,
Assert.IsTrue(bitIconTag.ClassList.Contains($"bit-icon--{iconName}"));
}

[DataTestMethod,
[TestMethod,
DataRow(true),
DataRow(false),
]
Expand All @@ -63,7 +63,7 @@ public void BitToggleButtonClickEvent(bool isEnabled)
Assert.AreEqual(isEnabled, clicked);
}

[DataTestMethod,
[TestMethod,
DataRow(true, true),
DataRow(true, false),
DataRow(false, true),
Expand All @@ -86,7 +86,7 @@ public void BitToggleButtonShouldChangeIsCheckedParameterAfterClickWhenIsEnable(
Assert.AreEqual(isEnabled ? !isChecked : isChecked, isCheckedBindingValue);
}

[DataTestMethod,
[TestMethod,
DataRow(true, true),
DataRow(true, false),
DataRow(false, true),
Expand All @@ -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),
Expand All @@ -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<BitToggleButton>(parameters =>
Expand All @@ -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<BitToggleButton>(parameters =>
Expand All @@ -164,7 +164,7 @@ public void BitToggleButtonAriaLabelTest(string ariaLabel)
Assert.AreEqual(bitButton.GetAttribute("aria-label"), ariaLabel);
}

[DataTestMethod,
[TestMethod,
DataRow(true),
DataRow(false),
DataRow(null)
Expand All @@ -181,7 +181,7 @@ public void BitToggleButtonAriaHiddenTest(bool ariaHidden)
Assert.AreEqual(ariaHidden, bitButton.HasAttribute("aria-hidden"));
}

[DataTestMethod,
[TestMethod,
DataRow(true),
DataRow(false),
DataRow(null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void BitMarkdownViewerShouldReparseWhenMarkdownChanges()
});
}

[DataTestMethod,
[TestMethod,
DataRow(true),
DataRow(false)]
public void BitMarkdownViewerShouldRespectIsEnabled(bool isEnabled)
Expand Down
Loading
Loading