Skip to content

Commit 955968c

Browse files
committed
test: 更新单元测试
1 parent 64621a6 commit 955968c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/UnitTest/Components/SearchTest.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ public void ShowPrefixIcon_Ok()
158158
{
159159
pb.Add(a => a.ShowPrefixIcon, true);
160160
});
161-
cut.Contains("search auto-complete search-prefix");
162-
cut.Contains("<div class=\"search-icon search-prefix-icon\"><i class=\"fa-solid fa-magnifying-glass\"></i></div>");
161+
cut.Contains("<div class=\"search-prefix-icon\"><i class=\"fa-solid fa-magnifying-glass\"></i></div>");
163162
}
164163

165164
[Fact]
@@ -180,9 +179,9 @@ public void IconTemplate_Ok()
180179
var items = new List<string?>() { null, "test1", "test2" };
181180
var cut = Context.RenderComponent<Search<string?>>(pb =>
182181
{
183-
pb.Add(a => a.IconTemplate, context => b => b.AddContent(0, "test--icon-template"));
182+
pb.Add(a => a.IconTemplate, context => b => b.AddContent(0, "test-icon-template"));
184183
});
185-
cut.Contains("<div class=\"search-icon\">test-icon-template</div>");
184+
cut.Contains("test-icon-template");
186185
}
187186

188187
[Fact]
@@ -203,7 +202,6 @@ public void IsClearable_Ok()
203202
{
204203
pb.Add(a => a.IsClearable, true);
205204
});
206-
cut.Contains("search auto-complete search-clear");
207205
cut.Contains("<div class=\"search-icon search-clear-icon\">");
208206
}
209207

0 commit comments

Comments
 (0)