Skip to content

Commit 2e21c24

Browse files
committed
test: 更新单元测试
1 parent 08fceef commit 2e21c24

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/UnitTest/Components/DateTimePickerTest.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,20 @@ public void SidebarTemplate_Ok()
959959
cut.Contains("test-sidebar-template");
960960
}
961961

962+
[Fact]
963+
public void FirstDayOfWeek_Ok()
964+
{
965+
var cut = Context.RenderComponent<DateTimePicker<DateTime>>(pb =>
966+
{
967+
pb.Add(a => a.FirstDayOfWeek, DayOfWeek.Monday);
968+
pb.Add(a => a.Value, new DateTime(2025, 02, 20));
969+
});
970+
971+
var labels = cut.FindAll(".date-table tbody > tr:first-child > th");
972+
Assert.Equal("一", labels[0].TextContent);
973+
Assert.Equal("日", labels[6].TextContent);
974+
}
975+
962976
[Fact]
963977
public void GetSafeYearDateTime_Ok()
964978
{

0 commit comments

Comments
 (0)