Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Components/Web.JS/src/Boot.WebAssembly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async function boot(options?: Partial<WebAssemblyStartOptions>): Promise<void> {
}

// Start up the application
await platform.callEntryPoint(resourceLoader.bootConfig.entryAssembly);
platform.callEntryPoint(resourceLoader.bootConfig.entryAssembly);
}

function invokeJSFromDotNet(callInfo: Pointer, arg0: any, arg1: any, arg2: any): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
<a class="dismiss">🗙</a>
</div>

<script src="_framework/blazor.webassembly.js"></script>
<script src="_framework/blazor.webassembly.js" autostart="false"></script>
<script>
(function(){
Blazor.start().then(function () {
window['__aspnetcore__testing__blazor_wasm__started__'] = true;
});
})();
</script>
</body>
</html>
16 changes: 16 additions & 0 deletions src/Components/test/E2ETest/Tests/StandaloneAppTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,22 @@ public void HasFetchDataPage()
}
}

[Fact]
public void IsStarted()
{
// Read from property
var jsExecutor = (IJavaScriptExecutor)Browser;

var isStarted = jsExecutor.ExecuteScript("return window['__aspnetcore__testing__blazor_wasm__started__'];");
if (isStarted is null)
{
throw new InvalidOperationException("Blazor wasm started value not set");
}

// Confirm server has started
Assert.True((bool)isStarted);
}

private void WaitUntilLoaded()
{
var app = Browser.Exists(By.TagName("app"));
Expand Down