From 2150820efe05ff63184cfaee438fe7cd4e8893da Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Fri, 16 Mar 2018 16:55:46 +0000 Subject: [PATCH] Implement Blazor.navigateTo for triggering navigation from JS code, and use it in E2E tests --- .../src/GlobalExports.ts | 2 ++ .../src/Services/UriHelper.ts | 15 +++++++++------ .../Tests/RoutingTest.cs | 3 ++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.AspNetCore.Blazor.Browser.JS/src/GlobalExports.ts b/src/Microsoft.AspNetCore.Blazor.Browser.JS/src/GlobalExports.ts index c25ac06b4d..6278b3f893 100644 --- a/src/Microsoft.AspNetCore.Blazor.Browser.JS/src/GlobalExports.ts +++ b/src/Microsoft.AspNetCore.Blazor.Browser.JS/src/GlobalExports.ts @@ -1,5 +1,6 @@ import { platform } from './Environment' import { registerFunction } from './Interop/RegisteredFunction'; +import { navigateTo } from './Services/UriHelper'; if (typeof window !== 'undefined') { // When the library is loaded in a browser via a