diff --git a/src/Components/WebAssembly/testassets/HostedInAspNet.Client/wwwroot/index.html b/src/Components/WebAssembly/testassets/HostedInAspNet.Client/wwwroot/index.html index b1ef16997e..643b68bb6b 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 645add5e4d..0000000000 --- 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 d153fa6d5a..6101d32b1f 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 645add5e4d..0000000000 --- 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 9ed4cb7a58..1182244f14 100644 --- a/src/Components/test/E2ETest/ServerExecutionTests/MultipleRootComponentsTest.cs +++ b/src/Components/test/E2ETest/ServerExecutionTests/MultipleRootComponentsTest.cs @@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests } } - [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 e4df7a050b..6615244cd5 100644 --- a/src/Components/test/E2ETest/ServerExecutionTests/ServerReconnectionTest.cs +++ b/src/Components/test/E2ETest/ServerExecutionTests/ServerReconnectionTest.cs @@ -78,7 +78,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests 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 13ebf2e5e5..d1fc96776b 100644 --- a/src/Components/test/E2ETest/Tests/WebAssemblyAuthenticationTests.cs +++ b/src/Components/test/E2ETest/Tests/WebAssemblyAuthenticationTests.cs @@ -306,7 +306,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests 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 1d49906642..adb01de8a0 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 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests 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 cacbf7e9fe..4886e1f9ae 100644 --- a/src/Components/test/E2ETest/Tests/WebAssemblyLazyLoadTest.cs +++ b/src/Components/test/E2ETest/Tests/WebAssemblyLazyLoadTest.cs @@ -108,7 +108,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests 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 f26778656c..eef9388aa7 100644 --- a/src/Components/test/E2ETest/Tests/WebAssemblyLoggingTest.cs +++ b/src/Components/test/E2ETest/Tests/WebAssemblyLoggingTest.cs @@ -32,7 +32,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests 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 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests "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 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests "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 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests "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 9aeaddab93..86d156fd1d 100644 --- a/src/Components/test/testassets/BasicTestApp/wwwroot/index.html +++ b/src/Components/test/testassets/BasicTestApp/wwwroot/index.html @@ -26,7 +26,6 @@ - @@ -49,8 +48,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 645add5e4d..0000000000 --- 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 e5656cfd7c..ff2d847d5b 100644 --- a/src/Components/test/testassets/TestServer/Pages/PrerenderedHost.cshtml +++ b/src/Components/test/testassets/TestServer/Pages/PrerenderedHost.cshtml @@ -20,8 +20,6 @@ - - - -