Skip to content

Commit 48ccbc4

Browse files
committed
test: 更新 Table 单元测试
1 parent d33616a commit 48ccbc4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/UnitTest/Components/TableTest.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8720,6 +8720,23 @@ public void Modify_Ok()
87208720
Assert.True(ProhibitDelete(cut.Instance));
87218721
}
87228722

8723+
[Fact]
8724+
public async Task Table_Sortable()
8725+
{
8726+
var cut = Context.RenderComponent<Table<Foo>(pb =>
8727+
{
8728+
pb.Add(a => a.TableColumns, foo => builder =>
8729+
{
8730+
builder.OpenComponent<TableColumn<Foo, string>>(0);
8731+
builder.AddAttribute(1, "Field", "Name");
8732+
builder.AddAttribute(2, "FieldExpression", Utility.GenerateValueExpression(foo, "Name", typeof(string)));
8733+
builder.CloseComponent();
8734+
});
8735+
pb.Add(a => a.ShowExtendEditButton, false);
8736+
pb.Add(a => a.ShowExtendDeleteButton, false);
8737+
});
8738+
}
8739+
87238740
static bool ProhibitEdit(Table<Foo> @this)
87248741
{
87258742
var ret = false;

0 commit comments

Comments
 (0)