Skip to content

Commit

Permalink
Update nuget packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mingyaulee committed Apr 21, 2022
1 parent 53e7b44 commit b270bd1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public async Task GetVisits()

// Assert
visits.Should().NotBeNullOrEmpty();
((DateTime)visits.Single().VisitTime).Should().BeCloseTo(testHistoryTime, precision: 1000);
((DateTime)visits.Single().VisitTime).Should().BeCloseTo(testHistoryTime, precision: TimeSpan.FromSeconds(1));
}

[Fact(Order = 2)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public async Task Update()

// Assert
window.Should().NotBeNull();
window.Top.Should().BeCloseTo(windowTop, 5);
window.Left.Should().BeCloseTo(windowLeft, 5);
window.Top.Should().BeInRange(windowTop - 5, windowTop + 5);
window.Left.Should().BeInRange(windowLeft - 5, windowLeft + 5);
}

[Fact(Order = 4)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Blazor.BrowserExtension" Version="0.8.*" />
<PackageReference Include="FluentAssertions" Version="5.*" />
<PackageReference Include="Blazor.BrowserExtension" Version="0.9.*" />
<PackageReference Include="FluentAssertions" Version="6.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.*-*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.*-*" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="7.*-*" />
Expand Down
14 changes: 7 additions & 7 deletions test/WebExtensions.Net.IntegrationTestsRunner/Runner.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Remote;
using System;
using System.IO;
using System.Text.Json;
Expand Down Expand Up @@ -70,14 +70,14 @@ public async Task RunTests()
}
}

private static RemoteWebDriver GetWebDriver(string driverPath, string extensionPath)
private static WebDriver GetWebDriver(string driverPath, string extensionPath)
{
var chromeOptions = new ChromeOptions();
chromeOptions.AddArgument($"load-extension={extensionPath}");
return new ChromeDriver(driverPath, chromeOptions);
}

private static async Task WaitForExtensionPageLoaded(RemoteWebDriver webDriver)
private static async Task WaitForExtensionPageLoaded(WebDriver webDriver)
{
// wait for 10 seconds
var waitTime = 10 * 1000;
Expand All @@ -100,14 +100,14 @@ private static async Task WaitForExtensionPageLoaded(RemoteWebDriver webDriver)
}
}

private static void LaunchTestPage(RemoteWebDriver webDriver)
private static void LaunchTestPage(WebDriver webDriver)
{
var extensionUri = new Uri(webDriver.Url);
var testPageUrl = $"{extensionUri.Scheme}://{extensionUri.Host}/tests.html?random=false&coverlet";
webDriver.Navigate().GoToUrl(testPageUrl);
}

private static async Task WaitForTestToFinish(RemoteWebDriver webDriver)
private static async Task WaitForTestToFinish(WebDriver webDriver)
{
// wait for 30 seconds
var waitTime = 30 * 1000;
Expand All @@ -132,7 +132,7 @@ private static async Task WaitForTestToFinish(RemoteWebDriver webDriver)
}
}

private static TestRunInfo GetTestResults(RemoteWebDriver webDriver)
private static TestRunInfo GetTestResults(WebDriver webDriver)
{
var resultsObject = (string)webDriver.ExecuteScript("return JSON.stringify(TestRunner.GetTestResults());");
var testRunResult = JsonSerializer.Deserialize<TestRunInfo>(resultsObject, new JsonSerializerOptions()
Expand All @@ -156,7 +156,7 @@ private static TestRunInfo GetTestResults(RemoteWebDriver webDriver)
return testRunResult;
}

private static async Task<TestCoverage> GetTestCoverageHits(RemoteWebDriver webDriver)
private static async Task<TestCoverage> GetTestCoverageHits(WebDriver webDriver)
{
// wait for 5 seconds
var waitTime = 5 * 1000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.3" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.3" />
<PackageReference Include="Selenium.WebDriver" Version="3.141.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.9" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.9" />
<PackageReference Include="Selenium.WebDriver" Version="4.1.0" />
<PackageReference Include="System.Xml.XmlSerializer" Version="4.3.0" />
</ItemGroup>

Expand Down

0 comments on commit b270bd1

Please sign in to comment.