diff --git a/src/Components/WebAssembly/testassets/HostedInAspNet.Client/wwwroot/index.html b/src/Components/WebAssembly/testassets/HostedInAspNet.Client/wwwroot/index.html index b1ef16997e0c..643b68bb6bd6 100644 --- a/src/Components/WebAssembly/testassets/HostedInAspNet.Client/wwwroot/index.html +++ b/src/Components/WebAssembly/testassets/HostedInAspNet.Client/wwwroot/index.html @@ -6,7 +6,6 @@ Loading... - diff --git a/src/Components/WebAssembly/testassets/HostedInAspNet.Client/wwwroot/seleniumworkaround.js b/src/Components/WebAssembly/testassets/HostedInAspNet.Client/wwwroot/seleniumworkaround.js deleted file mode 100644 index 645add5e4d83..000000000000 --- a/src/Components/WebAssembly/testassets/HostedInAspNet.Client/wwwroot/seleniumworkaround.js +++ /dev/null @@ -1,26 +0,0 @@ -(function () { - // Note: there are multiple copies of this file throughout the repo. If you're editing it, please look for - // other seleniumworkaround.js files and keep them all in sync. - const logs = []; - - const defaultLog = console.log; - console.log = function () { - defaultLog.apply(console, arguments); - logs.push(Array.from(arguments).join(' ')); - } - - const defaultError = console.error; - console.error = function () { - defaultError.apply(console, arguments); - logs.push(Array.from(arguments).join(' ')); - } - - const defaultWarn = console.warn; - console.warn = function () { - defaultWarn.apply(console, arguments); - logs.push(Array.from(arguments).join(' ')); - } - - window.getBrowserLogs = () => logs; -})(); - diff --git a/src/Components/WebAssembly/testassets/Wasm.Authentication.Client/wwwroot/index.html b/src/Components/WebAssembly/testassets/Wasm.Authentication.Client/wwwroot/index.html index d153fa6d5a3b..6101d32b1f18 100644 --- a/src/Components/WebAssembly/testassets/Wasm.Authentication.Client/wwwroot/index.html +++ b/src/Components/WebAssembly/testassets/Wasm.Authentication.Client/wwwroot/index.html @@ -18,7 +18,6 @@ 🗙 - diff --git a/src/Components/WebAssembly/testassets/Wasm.Authentication.Client/wwwroot/seleniumworkaround.js b/src/Components/WebAssembly/testassets/Wasm.Authentication.Client/wwwroot/seleniumworkaround.js deleted file mode 100644 index 645add5e4d83..000000000000 --- a/src/Components/WebAssembly/testassets/Wasm.Authentication.Client/wwwroot/seleniumworkaround.js +++ /dev/null @@ -1,26 +0,0 @@ -(function () { - // Note: there are multiple copies of this file throughout the repo. If you're editing it, please look for - // other seleniumworkaround.js files and keep them all in sync. - const logs = []; - - const defaultLog = console.log; - console.log = function () { - defaultLog.apply(console, arguments); - logs.push(Array.from(arguments).join(' ')); - } - - const defaultError = console.error; - console.error = function () { - defaultError.apply(console, arguments); - logs.push(Array.from(arguments).join(' ')); - } - - const defaultWarn = console.warn; - console.warn = function () { - defaultWarn.apply(console, arguments); - logs.push(Array.from(arguments).join(' ')); - } - - window.getBrowserLogs = () => logs; -})(); - diff --git a/src/Components/test/E2ETest/ServerExecutionTests/MultipleRootComponentsTest.cs b/src/Components/test/E2ETest/ServerExecutionTests/MultipleRootComponentsTest.cs index 9ed4cb7a582f..1182244f14f3 100644 --- a/src/Components/test/E2ETest/ServerExecutionTests/MultipleRootComponentsTest.cs +++ b/src/Components/test/E2ETest/ServerExecutionTests/MultipleRootComponentsTest.cs @@ -43,7 +43,7 @@ public override async Task InitializeAsync() } } - [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] + [Fact] public void DoesNotStartMultipleConnections() { Navigate("/multiple-components"); diff --git a/src/Components/test/E2ETest/ServerExecutionTests/ServerReconnectionTest.cs b/src/Components/test/E2ETest/ServerExecutionTests/ServerReconnectionTest.cs index e4df7a050b3a..6615244cd5b8 100644 --- a/src/Components/test/E2ETest/ServerExecutionTests/ServerReconnectionTest.cs +++ b/src/Components/test/E2ETest/ServerExecutionTests/ServerReconnectionTest.cs @@ -78,7 +78,7 @@ public void RendersContinueAfterReconnect() Browser.False(() => Browser.Exists(selector).Text == currentValue); } - [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] + [Fact] public void ErrorsStopTheRenderingProcess() { Browser.Exists(By.Id("cause-error")).Click(); diff --git a/src/Components/test/E2ETest/Tests/WebAssemblyAuthenticationTests.cs b/src/Components/test/E2ETest/Tests/WebAssemblyAuthenticationTests.cs index 13ebf2e5e5a8..d1fc96776bf9 100644 --- a/src/Components/test/E2ETest/Tests/WebAssemblyAuthenticationTests.cs +++ b/src/Components/test/E2ETest/Tests/WebAssemblyAuthenticationTests.cs @@ -306,7 +306,7 @@ public void LoggedInUser_OnTheIdP_CanLogInSilently() ValidateLoggedIn(userName); } - [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] + [Fact] public void CanNotRedirect_To_External_ReturnUrl() { Browser.Navigate().GoToUrl(new Uri(new Uri(Browser.Url), "/authentication/login?returnUrl=https%3A%2F%2Fwww.bing.com").AbsoluteUri); diff --git a/src/Components/test/E2ETest/Tests/WebAssemblyICUShardingTest.cs b/src/Components/test/E2ETest/Tests/WebAssemblyICUShardingTest.cs index 1d4990664231..adb01de8a06f 100644 --- a/src/Components/test/E2ETest/Tests/WebAssemblyICUShardingTest.cs +++ b/src/Components/test/E2ETest/Tests/WebAssemblyICUShardingTest.cs @@ -1,7 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using System.Globalization; +using System.Linq; using GlobalizationWasmApp; using Microsoft.AspNetCore.Components.E2ETest.Infrastructure; using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; @@ -107,11 +109,10 @@ public void LoadingApp_DynamicallySetLanguageThrows() var errorUi = Browser.Exists(By.Id("blazor-error-ui")); Browser.Equal("block", () => errorUi.GetCssValue("display")); - // Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803" - // var expected = "This application's globalization settings requires using the combined globalization data file."; - // var logs = Browser.GetBrowserLogs(LogLevel.Severe).Select(l => l.Message); - // Assert.True(logs.Any(l => l.Contains(expected)), - // $"Expected to see globalization error message in the browser logs: {string.Join(Environment.NewLine, logs)}."); + var expected = "Blazor detected a change in the application's culture that is not supported with the current project configuration."; + var logs = Browser.GetBrowserLogs(LogLevel.Severe).Select(l => l.Message); + Assert.True(logs.Any(l => l.Contains(expected)), + $"Expected to see globalization error message in the browser logs: {string.Join(Environment.NewLine, logs)}."); } private void Initialize(CultureInfo culture) diff --git a/src/Components/test/E2ETest/Tests/WebAssemblyLazyLoadTest.cs b/src/Components/test/E2ETest/Tests/WebAssemblyLazyLoadTest.cs index cacbf7e9feb9..4886e1f9ae26 100644 --- a/src/Components/test/E2ETest/Tests/WebAssemblyLazyLoadTest.cs +++ b/src/Components/test/E2ETest/Tests/WebAssemblyLazyLoadTest.cs @@ -108,7 +108,7 @@ public void CanLazyLoadAssemblyWithRoutes() Assert.True(renderedElement.Displayed); } - [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] + [Fact] public void ThrowsErrorForUnavailableAssemblies() { // Navigate to a page with lazy loaded assemblies for the first time diff --git a/src/Components/test/E2ETest/Tests/WebAssemblyLoggingTest.cs b/src/Components/test/E2ETest/Tests/WebAssemblyLoggingTest.cs index f26778656cd7..eef9388aa7e3 100644 --- a/src/Components/test/E2ETest/Tests/WebAssemblyLoggingTest.cs +++ b/src/Components/test/E2ETest/Tests/WebAssemblyLoggingTest.cs @@ -32,7 +32,7 @@ protected override void InitializeAsyncCore() Assert.Equal("none", errorUi.GetCssValue("display")); } - [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] + [Fact] public void LogsSimpleExceptionsUsingLogger() { Browser.Exists(By.Id("throw-simple-exception")).Click(); @@ -44,7 +44,7 @@ public void LogsSimpleExceptionsUsingLogger() "at BasicTestApp.ErrorComponent.ThrowSimple"); } - [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] + [Fact] public void LogsInnerExceptionsUsingLogger() { Browser.Exists(By.Id("throw-inner-exception")).Click(); @@ -57,7 +57,7 @@ public void LogsInnerExceptionsUsingLogger() "at BasicTestApp.ErrorComponent.ThrowInner"); } - [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] + [Fact] public void LogsAggregateExceptionsUsingLogger() { Browser.Exists(By.Id("throw-aggregate-exception")).Click(); @@ -72,7 +72,7 @@ public void LogsAggregateExceptionsUsingLogger() "System.InvalidTimeZoneException: Aggregate exception 3"); } - [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] + [Fact] public void LogsUsingCustomLogger() { Browser.MountTestComponent(); diff --git a/src/Components/test/testassets/BasicTestApp/wwwroot/index.html b/src/Components/test/testassets/BasicTestApp/wwwroot/index.html index b5c1e33d8f51..74fc42d3f933 100644 --- a/src/Components/test/testassets/BasicTestApp/wwwroot/index.html +++ b/src/Components/test/testassets/BasicTestApp/wwwroot/index.html @@ -26,7 +26,6 @@ - @@ -48,8 +47,6 @@ - - diff --git a/src/Components/test/testassets/BasicTestApp/wwwroot/js/seleniumworkaround.js b/src/Components/test/testassets/BasicTestApp/wwwroot/js/seleniumworkaround.js deleted file mode 100644 index 645add5e4d83..000000000000 --- a/src/Components/test/testassets/BasicTestApp/wwwroot/js/seleniumworkaround.js +++ /dev/null @@ -1,26 +0,0 @@ -(function () { - // Note: there are multiple copies of this file throughout the repo. If you're editing it, please look for - // other seleniumworkaround.js files and keep them all in sync. - const logs = []; - - const defaultLog = console.log; - console.log = function () { - defaultLog.apply(console, arguments); - logs.push(Array.from(arguments).join(' ')); - } - - const defaultError = console.error; - console.error = function () { - defaultError.apply(console, arguments); - logs.push(Array.from(arguments).join(' ')); - } - - const defaultWarn = console.warn; - console.warn = function () { - defaultWarn.apply(console, arguments); - logs.push(Array.from(arguments).join(' ')); - } - - window.getBrowserLogs = () => logs; -})(); - diff --git a/src/Components/test/testassets/TestServer/Pages/PrerenderedHost.cshtml b/src/Components/test/testassets/TestServer/Pages/PrerenderedHost.cshtml index e5656cfd7c5d..ff2d847d5bf1 100644 --- a/src/Components/test/testassets/TestServer/Pages/PrerenderedHost.cshtml +++ b/src/Components/test/testassets/TestServer/Pages/PrerenderedHost.cshtml @@ -20,8 +20,6 @@ - - - -