Skip to content

Commit 4c89567

Browse files
committed
test: 更新单元测试
1 parent f1e92c8 commit 4c89567

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/UnitTest/Components/TableDialogTest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using AngleSharp.Dom;
77
using Microsoft.AspNetCore.Components.Web;
88
using Microsoft.Extensions.Localization;
9+
using Microsoft.Extensions.Options;
910
using System.Reflection;
1011

1112
namespace UnitTest.Components;
@@ -15,12 +16,15 @@ public class TableDialogTest : TableDialogTestBase
1516
[Fact]
1617
public async Task EditAsync_Ok()
1718
{
19+
var options = Context.Services.GetRequiredService<IOptionsMonitor<BootstrapBlazorOptions>>();
20+
options.CurrentValue.ToastDelay = 0;
1821
var localizer = Context.Services.GetRequiredService<IStringLocalizer<Foo>>();
1922
var items = Foo.GenerateFoo(localizer, 2);
2023
var cut = Context.RenderComponent<BootstrapBlazorRoot>(pb =>
2124
{
2225
pb.AddChildContent<Table<Foo>>(pb =>
2326
{
27+
pb.Add(a => a.ToastDelay, 4000);
2428
pb.Add(a => a.RenderMode, TableRenderMode.Table);
2529
pb.Add(a => a.Items, items);
2630
pb.Add(a => a.EditDialogIsDraggable, true);

0 commit comments

Comments
 (0)