Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@
<NewtonsoftJsonBsonPackageVersion>1.0.2</NewtonsoftJsonBsonPackageVersion>
<NewtonsoftJsonPackageVersion>12.0.2</NewtonsoftJsonPackageVersion>
<NSwagApiDescriptionClientPackageVersion>13.0.4</NSwagApiDescriptionClientPackageVersion>
<SeleniumSupportPackageVersion>3.12.1</SeleniumSupportPackageVersion>
<SeleniumSupportPackageVersion>4.0.0-alpha05</SeleniumSupportPackageVersion>
<SeleniumWebDriverMicrosoftDriverPackageVersion>17.17134.0</SeleniumWebDriverMicrosoftDriverPackageVersion>
<SeleniumWebDriverChromeDriverPackageVersion>2.43.0</SeleniumWebDriverChromeDriverPackageVersion>
<SeleniumWebDriverPackageVersion>3.12.1</SeleniumWebDriverPackageVersion>
<SeleniumWebDriverChromeDriverPackageVersion>85.0.4183.8300</SeleniumWebDriverChromeDriverPackageVersion>
Copy link
Member

@captainsafia captainsafia Aug 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a pretty big jump. Did something change with the way the package is versioned?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, they moved to use versions matching Chrome versions. There as a jump from v.2.46.0 to v.71.0.3578.137 a while back.

In addition, we were almost 2 years out-of-date in using v2.43.0.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. That makes sense.

How does this mesh with the fact that we don't control what version of Chrome is downloaded with the installer (AFAIK)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should mean we can be proactive. Whenever a dev notices their Chrome installation wants to be restarted, they can check whether it's a new major version and update this particular package version. Or, @sebastienros could add a reminder to check the Selenium versions in his ops rotation invites every few (10?) rotations.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could, I am afraid I will forget ;) I would suggest to update the operations book, and let's say "if your rotation happens on the first Tuesday of the month then you should ..."

Mondays are frequently skipped due to holidays

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<SeleniumWebDriverPackageVersion>4.0.0-alpha05</SeleniumWebDriverPackageVersion>
<SerilogExtensionsLoggingPackageVersion>1.4.0</SerilogExtensionsLoggingPackageVersion>
<SerilogSinksFilePackageVersion>4.0.0</SerilogSinksFilePackageVersion>
<StackExchangeRedisPackageVersion>2.0.593</StackExchangeRedisPackageVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
<SkipTests Condition="'$(SeleniumE2ETestsSupported)' != 'true'">true</SkipTests>
<SkipTests Condition="'$(SeleniumE2ETestsSupported)' == 'true'">false</SkipTests>

<!-- Tests are disabled due to https://github.com/dotnet/aspnetcore/issues/25322 -->
<SkipTests>true</SkipTests>

<!-- Tests do not work on Helix or when bin/ directory is not in project directory due to undeclared dependency on test content. -->
<BaseOutputPath />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/Components/test/E2ETest/Tests/WebAssemblyLoggingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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<LoggingComponent>();
Expand Down
2 changes: 1 addition & 1 deletion src/Components/test/testassets/TestServer/ServerStartup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@

<RunTemplateTests Condition="'$(RunTemplateTests)' == ''" >true</RunTemplateTests>
<SkipTests Condition="'$(RunTemplateTests)' != 'true'">true</SkipTests>

<!-- Tests are disabled due to https://github.com/dotnet/aspnetcore/issues/25322 -->
<SkipTests>true</SkipTests>

<!--Do not run this test project on Helix.-->
<BuildHelixPayload>false</BuildHelixPayload>
<SkipHelixArm>true</SkipHelixArm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
51 changes: 37 additions & 14 deletions src/Shared/E2ETesting/BrowserFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this? We ended up not going this route @ajaybhargavb isn't that the case?

We only need chrome I believe

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only need Chrome for local and CI tests. But we use other browsers when running in SauceLabs. We need to pass in the correct options to SauceLabs in that case. DesiredCapabilities used to be enough but that is now obsoleted in the newer version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajaybhargavb but do we actually run in SauceLabs? I thought we discarded that idea. That's why I'm asking.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still want to. What we discarded was the idea to do real device testing on SauceLabs.


// 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;
Expand Down
6 changes: 4 additions & 2 deletions src/Shared/E2ETesting/selenium-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"drivers": {
"chrome": {}
"chrome": {
"version" : "85.0.4183.87"
}
},
"ignoreExtraDrivers": true
"ignoreExtraDrivers": true
}