File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,8 @@ await cut.InvokeAsync(() => dialog.Show(new DialogOption()
211211 } ;
212212 await cut . InvokeAsync ( ( ) => dialog . ShowEditDialog ( editOption ) ) ;
213213 // 点击关闭按钮
214+ button = cut . FindComponents < Button > ( ) . First ( b => b . Instance . Text == "关闭" ) ;
215+ await cut . InvokeAsync ( ( ) => button . Instance . OnClickWithoutRender ! . Invoke ( ) ) ;
214216 await cut . InvokeAsync ( ( ) => modal . Instance . CloseCallback ( ) ) ;
215217 Assert . True ( closed ) ;
216218
@@ -245,13 +247,15 @@ await cut.InvokeAsync(() => dialog.Show(new DialogOption()
245247 // edit dialog is tracking true
246248 editOption . IsTracking = true ;
247249 await cut . InvokeAsync ( ( ) => dialog . ShowEditDialog ( editOption ) ) ;
248- Assert . Empty ( cut . FindAll ( ".bb-editor-footer .btn-secondary" ) ) ;
250+ button = cut . FindComponents < Button > ( ) . FirstOrDefault ( b => b . Instance . Text == "关闭" ) ;
251+ Assert . Null ( button ) ;
249252 await cut . InvokeAsync ( ( ) => modal . Instance . CloseCallback ( ) ) ;
250253
251254 // edit dialog is tracking false
252255 editOption . IsTracking = false ;
253256 await cut . InvokeAsync ( ( ) => dialog . ShowEditDialog ( editOption ) ) ;
254- Assert . NotNull ( cut . Find ( ".bb-editor-footer .btn-secondary" ) ) ;
257+ button = cut . FindComponents < Button > ( ) . FirstOrDefault ( b => b . Instance . Text == "关闭" ) ;
258+ Assert . NotNull ( button ) ;
255259 await cut . InvokeAsync ( ( ) => modal . Instance . CloseCallback ( ) ) ;
256260
257261 // Edit Dialog FooterTemplate
You can’t perform that action at this time.
0 commit comments