File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 33// See the LICENSE file in the project root for more information.
44// Maintainer: Argo Zhang([email protected] ) Website: https://www.blazor.zone 55
6- using Microsoft . AspNetCore . Components . Web ;
7-
86namespace UnitTest . Components ;
97
108public class AutoCompleteTest : BootstrapBlazorTestBase
119{
1210 [ Fact ]
13- public void Items_Ok ( )
11+ public async Task Items_Ok ( )
1412 {
1513 var cut = Context . RenderComponent < AutoComplete > ( pb =>
1614 {
1715 pb . Add ( a => a . IsSelectAllTextOnFocus , true ) ;
1816 pb . Add ( a => a . IsSelectAllTextOnEnter , true ) ;
1917 } ) ;
2018 Assert . Contains ( "<div class=\" auto-complete\" " , cut . Markup ) ;
19+ Assert . Contains ( "data-bb-trigger-delete=\" true\" " , cut . Markup ) ;
20+
2121 var menus = cut . FindAll ( ".dropdown-item" ) ;
2222 Assert . Single ( menus ) ;
2323
@@ -35,6 +35,9 @@ public void Items_Ok()
3535 } ) ;
3636 menus = cut . FindAll ( ".dropdown-item" ) ;
3737 Assert . Equal ( 2 , menus . Count ) ;
38+
39+ await cut . InvokeAsync ( ( ) => cut . Instance . TriggerDeleteCallback ( "Test" ) ) ;
40+ Assert . Equal ( "Test" , cut . Instance . Value ) ;
3841 }
3942
4043 [ Fact ]
You can’t perform that action at this time.
0 commit comments