Add the design foundation: self-hosted Nunito, type scale, new tokens and an Icon component
This commit is contained in:
1 parent
3530167cc3
commit
33fa1e4e93
9 files changed
+401
-10
No files matched your search
@@ -0,0 +1,30 @@
|
||||
using Elternbeirat.Web.Shared;
|
||||
|
||||
namespace Elternbeirat.Web.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// Unit tests for the icon lookup behind the Icon component. Pure logic, no
|
||||
/// PocketBase needed.
|
||||
/// </summary>
|
||||
public class IconSetTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("calendar")]
|
||||
[InlineData("map-pin")]
|
||||
[InlineData("help-circle")] // kept under its old name although Lucide renamed it
|
||||
public void Known_name_returns_svg_markup(string name)
|
||||
{
|
||||
var markup = IconSet.Find(name);
|
||||
|
||||
markup.ShouldNotBeNullOrWhiteSpace();
|
||||
markup.ShouldStartWith("<"); // SVG child elements, ready to inline
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("does-not-exist")]
|
||||
[InlineData("Calendar")] // lookup is case-sensitive, names are code identifiers
|
||||
[InlineData("")]
|
||||
[InlineData(null)]
|
||||
public void Unknown_name_returns_null(string? name) =>
|
||||
IconSet.Find(name).ShouldBeNull();
|
||||
}
|
||||
Reference in new issue
Block a user