diff --git a/eng/Versions.props b/eng/Versions.props index fcc190377bb4..7febac4e0155 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -270,10 +270,10 @@ 1.0.2 12.0.2 13.0.4 - 3.12.1 + 4.0.0-alpha05 17.17134.0 - 2.43.0 - 3.12.1 + 85.0.4183.8300 + 4.0.0-alpha05 1.4.0 4.0.0 2.0.593 diff --git a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj index 4a363519fb7b..a2fe529a1929 100644 --- a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj +++ b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj @@ -14,9 +14,6 @@ true false - - true - diff --git a/src/Components/test/E2ETest/ServerExecutionTests/MultipleRootComponentsTest.cs b/src/Components/test/E2ETest/ServerExecutionTests/MultipleRootComponentsTest.cs index 6fc25c2c4624..d1bc0ca7ec52 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] + [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] 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 9b92d33aab63..aa8ed996e7ba 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.FindElement(selector).Text == currentValue); } - [Fact] + [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] public void ErrorsStopTheRenderingProcess() { Browser.FindElement(By.Id("cause-error")).Click(); diff --git a/src/Components/test/E2ETest/Tests/WebAssemblyAuthenticationTests.cs b/src/Components/test/E2ETest/Tests/WebAssemblyAuthenticationTests.cs index 52b25edefcb6..10a16061f892 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] + [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] 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/WebAssemblyLazyLoadTest.cs b/src/Components/test/E2ETest/Tests/WebAssemblyLazyLoadTest.cs index 8076ae61dc6b..317bae624ba0 100644 --- a/src/Components/test/E2ETest/Tests/WebAssemblyLazyLoadTest.cs +++ b/src/Components/test/E2ETest/Tests/WebAssemblyLazyLoadTest.cs @@ -111,7 +111,7 @@ public void CanLazyLoadAssemblyWithRoutes() Assert.True(renderedElement.Displayed); } - [Fact] + [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] 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 c6440eecd8c5..f659d2494249 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] + [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] public void LogsSimpleExceptionsUsingLogger() { Browser.FindElement(By.Id("throw-simple-exception")).Click(); @@ -44,7 +44,7 @@ public void LogsSimpleExceptionsUsingLogger() "at BasicTestApp.ErrorComponent.ThrowSimple"); } - [Fact] + [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] public void LogsInnerExceptionsUsingLogger() { Browser.FindElement(By.Id("throw-inner-exception")).Click(); @@ -57,7 +57,7 @@ public void LogsInnerExceptionsUsingLogger() "at BasicTestApp.ErrorComponent.ThrowInner"); } - [Fact] + [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] public void LogsAggregateExceptionsUsingLogger() { Browser.FindElement(By.Id("throw-aggregate-exception")).Click(); @@ -72,7 +72,7 @@ public void LogsAggregateExceptionsUsingLogger() "System.InvalidTimeZoneException: Aggregate exception 3"); } - [Fact] + [Fact(Skip = "Browser logs cannot be retrieved: https://github.com/dotnet/aspnetcore/issues/25803")] public void LogsUsingCustomLogger() { Browser.MountTestComponent(); diff --git a/src/Components/test/testassets/TestServer/ServerStartup.cs b/src/Components/test/testassets/TestServer/ServerStartup.cs index 83578c5dcb3a..bcd6e56e8848 100644 --- a/src/Components/test/testassets/TestServer/ServerStartup.cs +++ b/src/Components/test/testassets/TestServer/ServerStartup.cs @@ -19,7 +19,7 @@ public ServerStartup(IConfiguration configuration) public void ConfigureServices(IServiceCollection services) { services.AddMvc(); - services.AddServerSideBlazor(options => options.DetailedErrors = true); + services.AddServerSideBlazor(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj index 6a024814c24f..2da0e11666ef 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj +++ b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj @@ -10,10 +10,6 @@ true true - - - true - false true diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs index a1922ddfe908..3ee874e8dac6 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs +++ b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs @@ -40,7 +40,7 @@ public override Task InitializeAsync() return InitializeAsync(isolationContext: Guid.NewGuid().ToString()); } - [Fact] + [Fact(Skip = "Certificate issue: https://github.com/dotnet/aspnetcore/issues/25826")] public async Task BlazorWasmStandaloneTemplate_Works() { // Additional arguments are needed. See: https://github.com/dotnet/aspnetcore/issues/24278 diff --git a/src/Shared/E2ETesting/BrowserFixture.cs b/src/Shared/E2ETesting/BrowserFixture.cs index 557fbf37fc15..3e6fa36b6720 100644 --- a/src/Shared/E2ETesting/BrowserFixture.cs +++ b/src/Shared/E2ETesting/BrowserFixture.cs @@ -11,7 +11,10 @@ using System.Threading.Tasks; using OpenQA.Selenium; using OpenQA.Selenium.Chrome; +using OpenQA.Selenium.Edge; +using OpenQA.Selenium.IE; using OpenQA.Selenium.Remote; +using OpenQA.Selenium.Safari; using Xunit; using Xunit.Abstractions; @@ -234,55 +237,75 @@ private string UserProfileDirectory(string context) name = $"{name} - {context}"; } - var capabilities = new DesiredCapabilities(); + DriverOptions options; + + switch (sauce.BrowserName.ToLower()) + { + case "chrome": + options = new ChromeOptions(); + break; + case "safari": + options = new SafariOptions(); + break; + case "internet explorer": + options = new InternetExplorerOptions(); + break; + case "microsoftedge": + options = new EdgeOptions(); + break; + default: + throw new InvalidOperationException($"Browser name {sauce.BrowserName} not recognized"); + } // Required config - capabilities.SetCapability("username", sauce.Username); - capabilities.SetCapability("accessKey", sauce.AccessKey); - capabilities.SetCapability("tunnelIdentifier", sauce.TunnelIdentifier); - capabilities.SetCapability("name", name); + options.AddAdditionalOption("username", sauce.Username); + options.AddAdditionalOption("accessKey", sauce.AccessKey); + options.AddAdditionalOption("tunnelIdentifier", sauce.TunnelIdentifier); + options.AddAdditionalOption("name", name); if (!string.IsNullOrEmpty(sauce.BrowserName)) { - capabilities.SetCapability("browserName", sauce.BrowserName); + options.AddAdditionalOption("browserName", sauce.BrowserName); } if (!string.IsNullOrEmpty(sauce.PlatformVersion)) { - capabilities.SetCapability("platformName", sauce.PlatformName); - capabilities.SetCapability("platformVersion", sauce.PlatformVersion); + options.PlatformName = sauce.PlatformName; + options.AddAdditionalOption("platformVersion", sauce.PlatformVersion); } else { // In some cases (like macOS), SauceLabs expects us to set "platform" instead of "platformName". - capabilities.SetCapability("platform", sauce.PlatformName); + options.AddAdditionalOption("platform", sauce.PlatformName); } if (!string.IsNullOrEmpty(sauce.BrowserVersion)) { - capabilities.SetCapability("browserVersion", sauce.BrowserVersion); + options.BrowserVersion = sauce.BrowserVersion; } if (!string.IsNullOrEmpty(sauce.DeviceName)) { - capabilities.SetCapability("deviceName", sauce.DeviceName); + options.AddAdditionalOption("deviceName", sauce.DeviceName); } if (!string.IsNullOrEmpty(sauce.DeviceOrientation)) { - capabilities.SetCapability("deviceOrientation", sauce.DeviceOrientation); + options.AddAdditionalOption("deviceOrientation", sauce.DeviceOrientation); } if (!string.IsNullOrEmpty(sauce.AppiumVersion)) { - capabilities.SetCapability("appiumVersion", sauce.AppiumVersion); + options.AddAdditionalOption("appiumVersion", sauce.AppiumVersion); } if (!string.IsNullOrEmpty(sauce.SeleniumVersion)) { - capabilities.SetCapability("seleniumVersion", sauce.SeleniumVersion); + options.AddAdditionalOption("seleniumVersion", sauce.SeleniumVersion); } + var capabilities = options.ToCapabilities(); + await SauceConnectServer.StartAsync(output); var attempt = 0; diff --git a/src/Shared/E2ETesting/selenium-config.json b/src/Shared/E2ETesting/selenium-config.json index 95c078e2c712..0682e48d3201 100644 --- a/src/Shared/E2ETesting/selenium-config.json +++ b/src/Shared/E2ETesting/selenium-config.json @@ -1,6 +1,8 @@ { "drivers": { - "chrome": {} + "chrome": { + "version" : "85.0.4183.87" + } }, - "ignoreExtraDrivers": true + "ignoreExtraDrivers": true } \ No newline at end of file