File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change @@ -32,33 +32,6 @@ await cut.InvokeAsync(() => dialog.Show(new DialogOption()
3232 await cut . InvokeAsync ( ( ) => btn . Click ( ) ) ;
3333 }
3434
35- [ Fact ]
36- public async Task ShowToast_Ok ( )
37- {
38- var cut = Context . RenderComponent < BootstrapBlazorRoot > ( pb =>
39- {
40- pb . Add ( a => a . EnableErrorLogger , true ) ;
41- pb . Add ( a => a . ShowToast , true ) ;
42- pb . AddChildContent < ErrorComponent > ( ) ;
43- } ) ;
44- var errorButton = cut . Find ( ".btn-error" ) ;
45- await cut . InvokeAsync ( ( ) => errorButton . Click ( ) ) ;
46- cut . Contains ( "<div class=\" toast-body\" >test error logger</div>" ) ;
47-
48- // 关闭 Toast
49- var toast = cut . FindComponent < Toast > ( ) . Instance ;
50- await cut . InvokeAsync ( ( ) => toast . Close ( ) ) ;
51- cut . DoesNotContain ( "<div class=\" toast-body\" >test error logger</div>" ) ;
52-
53- cut . SetParametersAndRender ( pb =>
54- {
55- pb . Add ( a => a . ShowToast , false ) ;
56- } ) ;
57- errorButton = cut . Find ( ".btn-error" ) ;
58- await cut . InvokeAsync ( ( ) => errorButton . Click ( ) ) ;
59- cut . DoesNotContain ( "<div class=\" toast-body\" >test error logger</div>" ) ;
60- }
61-
6235 private class MockDialogTest : ComponentBase
6336 {
6437 [ Inject ]
You can’t perform that action at this time.
0 commit comments