Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ function enhancedNavigationIsEnabledForForm(form: HTMLFormElement): boolean {
function retryEnhancedNavAsFullPageLoad(internalDestinationHref: string) {
// The ? trick here is the same workaround as described in #10839, and without it, the user
// would not be able to use the back button afterwards.
console.warn(`Enhanced navigation failed for destination ${internalDestinationHref}. Falling back to full page load.`);
history.replaceState(null, '', internalDestinationHref + '?');
location.replace(internalDestinationHref);
}
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@ public void RefreshCanFallBackOnFullPageReload(string renderMode)
Browser.Exists(By.Id("refresh-with-refresh")).Click();
Browser.True(() => IsElementStale(initialRenderIdElement));

//Check if the warning about the fail were logged.
var logs = Browser.GetBrowserLogs(LogLevel.Warning);
Assert.Contains(logs, log => log.Message.Contains("Enhanced navigation failed for destination") && !log.Message.Contains("Error"));

var finalRenderIdElement = Browser.Exists(By.Id("render-id"));
var finalRenderId = -1;
Browser.True(() => int.TryParse(finalRenderIdElement.Text, out finalRenderId));
Expand Down
Loading