File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ namespace UnitTest.Components;
88public class IFrameTest : BootstrapBlazorTestBase
99{
1010 [ Fact ]
11- public void Frame_Ok ( )
11+ public async Task Frame_Ok ( )
1212 {
1313 var postData = false ;
1414 var cut = Context . RenderComponent < IFrame > ( pb =>
@@ -27,10 +27,26 @@ public void Frame_Ok()
2727 pb . Add ( a => a . Data , new { Rows = new List < string > ( ) { "1" , "2" } } ) ;
2828 } ) ;
2929
30- cut . InvokeAsync ( async ( ) =>
30+ await cut . InvokeAsync ( async ( ) =>
3131 {
32- await cut . Instance . CallbackAsync ( new List < string > { "2" , "3" } ) ;
32+ await cut . Instance . TriggerPostData ( new List < string > { "2" , "3" } ) ;
3333 Assert . True ( postData ) ;
3434 } ) ;
35+
36+ var loaded = false ;
37+ cut . SetParametersAndRender ( pb =>
38+ {
39+ pb . Add ( a => a . OnReadyAsync , ( ) =>
40+ {
41+ loaded = true ;
42+ return Task . CompletedTask ;
43+ } ) ;
44+ } ) ;
45+
46+ await cut . InvokeAsync ( async ( ) =>
47+ {
48+ await cut . Instance . TriggerLoaded ( ) ;
49+ } ) ;
50+ Assert . True ( loaded ) ;
3551 }
3652}
You can’t perform that action at this time.
0 commit comments