mirror of
https://gitee.com/LongbowEnterprise/BootstrapBlazor.git
synced 2024-12-06 22:19:48 +08:00
!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:
parent
1073ac8c7f
commit
9a9d9001d0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user