!2390 test(#I4SMH6): add Dialog unit test

* Merge branch 'main' into test-dialog
* test: 增加 ShowSaveDialog 单元测试
* test: 恢复默认导航
* test: 提高代码覆盖率
* refactor: 重构 Tab 代码提高代码覆盖率
* test: 增加 ActiveTab 单元测试
* refactor: 增加代码覆盖率
* test: 增加代码覆盖率
* refactor: 重构逻辑
* test: 增加 Key 单元测试
* test: TabItem 代码覆盖率 100%
* test: 增加 ChildContent 单元测试
* test: 增加 Click 单元测试
* test: 增加 TabLink 单元测试
This commit is contained in:
Argo 2022-02-05 16:11:44 +00:00
parent 1073ac8c7f
commit 9a9d9001d0

View File

@ -374,6 +374,13 @@ public class DialogTest : BootstrapBlazorTestBase
btnClose.Click();
Assert.True(save);
#endregion
#region ShowSaveDialog
cut.InvokeAsync(() => dialog.ShowSaveDialog<MockDialogTest>("Title", () => Task.FromResult(true)));
modal.FindAll("button")[modal.FindAll("button").Count - 1].Click();
cut.InvokeAsync(() => dialog.ShowSaveDialog<MockDialogTest>("Title", () => Task.FromResult(true), configureOption: op => op.Class = "test"));
modal.FindAll("button")[modal.FindAll("button").Count - 1].Click();
#endregion
}
private class MockDialogTest : ComponentBase