From ddce0f560ca11579cd538ee9815f32a75f057237 Mon Sep 17 00:00:00 2001 From: Tony996 <6914529@qq.com> Date: Mon, 6 Jul 2026 19:38:06 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=BD=93=E6=BF=80?= =?UTF-8?q?=E6=B4=BB=E6=8C=87=E5=AE=9A=E5=AD=90=E8=8A=82=E7=82=B9=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=BA=94=E5=85=A8=E9=83=A8=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refactor: 重构展开逻辑,当激活指定子节点时,应全部展开 --- src/BootstrapBlazor/Misc/ExpandableNodeCache.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/BootstrapBlazor/Misc/ExpandableNodeCache.cs b/src/BootstrapBlazor/Misc/ExpandableNodeCache.cs index 1f4d3d4dc9b..181b9b9b294 100644 --- a/src/BootstrapBlazor/Misc/ExpandableNodeCache.cs +++ b/src/BootstrapBlazor/Misc/ExpandableNodeCache.cs @@ -89,12 +89,6 @@ public async Task CheckExpandAsync(TNode node, Func Date: Mon, 6 Jul 2026 22:54:48 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix:更新单元测试,以匹配新单元测试框架 --- test/UnitTest/Dynamic/ChangeDetectionCleanTaskTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/UnitTest/Dynamic/ChangeDetectionCleanTaskTest.cs b/test/UnitTest/Dynamic/ChangeDetectionCleanTaskTest.cs index 808122cb7f0..6fe90656030 100644 --- a/test/UnitTest/Dynamic/ChangeDetectionCleanTaskTest.cs +++ b/test/UnitTest/Dynamic/ChangeDetectionCleanTaskTest.cs @@ -119,7 +119,7 @@ public async Task CleanLoop_Ok() var removed = false; for (var i = 0; i < 100 && !removed; i++) { - await Task.Delay(50); + await Task.Delay(50, Xunit.TestContext.Current.CancellationToken); removed = !cache.ContainsKey(dynamicType); } Assert.True(removed); From a0c58b50074cfe40e9fb855cc8c9e713df1a10f0 Mon Sep 17 00:00:00 2001 From: Tony <6914529@qq.com> Date: Tue, 7 Jul 2026 06:59:36 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=88=B6=E8=8A=82=E7=82=B9=E5=B1=95?= =?UTF-8?q?=E5=BC=80=E9=80=BB=E8=BE=91=E5=8F=98=E5=8A=A8=EF=BC=8C=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=E6=9C=9F=E6=9C=9B?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refactor:由于逻辑改变,默认存在子节点时,父节点全部展开,此时数量要将子节点数也要包括在内 --- test/UnitTest/Components/TableTest.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/UnitTest/Components/TableTest.cs b/test/UnitTest/Components/TableTest.cs index cc79e1b65ba..28d7dfaf16a 100644 --- a/test/UnitTest/Components/TableTest.cs +++ b/test/UnitTest/Components/TableTest.cs @@ -4052,7 +4052,8 @@ public async Task IsTree_KeepCollapsed() Assert.Contains("fa-solid fa-caret-right", cut.Markup); nodes = cut.FindAll("tbody tr"); - Assert.Equal(2, nodes.Count); + // 单元测试默认节点为展开状态,因此这里将期望值改为4 + Assert.Equal(4, nodes.Count); } private static Task> OnQueryAsync(QueryPageOptions _, IStringLocalizer localizer)