You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the recent merge of this PR: dotnet/aspnetcore#42638 (here the issue which tracks the topic: dotnet/aspnetcore#42877) users can intercept the NavigationManager and prevent redirects. To make it work we have to add some logic in the NavigateToCore function.
The user should have means to simulate the cancellation behaviour in a bUnit test. That said if he has a NavigationLock component which would prevent the navigation, we should have the same behaviour in bUnit. That includes also no new item on the NavigationHistory stack. No change of BaseUri or Uri.
Analysis
I tried to use the feature as it is already merged to main, but unfortunately the nightly builds don't include this function at the moment.
The text was updated successfully, but these errors were encountered:
With the recent merge of this PR: dotnet/aspnetcore#42638 (here the issue which tracks the topic: dotnet/aspnetcore#42877) users can intercept the
NavigationManager
and prevent redirects. To make it work we have to add some logic in theNavigateToCore
function.Here is an inspiration how it is done in the PR for the
RemoteNavigationManager
: https://github.com/dotnet/aspnetcore/blob/d1558107b97d2471e9a0aa5d008b511ead908fa7/src/Components/Server/src/Circuits/RemoteNavigationManager.cs#L84Goal
The user should have means to simulate the cancellation behaviour in a bUnit test. That said if he has a
NavigationLock
component which would prevent the navigation, we should have the same behaviour in bUnit. That includes also no new item on theNavigationHistory
stack. No change ofBaseUri
orUri
.Analysis
I tried to use the feature as it is already merged to main, but unfortunately the nightly builds don't include this function at the moment.
The text was updated successfully, but these errors were encountered: