Skip to content

Commit

Permalink
update to compatible dotnet and package versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mialeska committed Feb 28, 2024
1 parent 8f3bde3 commit fe22040
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aquality.WinAppDriver" Version="1.3.0" />
<PackageReference Include="Allure.SpecFlow" Version="2.11.0" />
<PackageReference Include="Aquality.WinAppDriver" Version="2.0.0" />
<PackageReference Include="AqualityTracking.SpecFlowPlugin" Version="1.0.1" />
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="nunit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="SpecFlow" Version="3.3.74" />
<PackageReference Include="SpecFlow.Allure" Version="3.1.0.6" />
<PackageReference Include="SpecFlow.NUnit" Version="3.3.74" />
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.3.74" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="SpecFlow" Version="3.9.74" />
<PackageReference Include="SpecFlow.NUnit" Version="3.9.74" />
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.9.74" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Allure.Commons;
using Allure.Net.Commons;
using AqualityTracking.Integrations.Core;
using NUnit.Framework;
using System.Text.RegularExpressions;
Expand All @@ -19,8 +19,7 @@ public PluginsHooks(ScenarioContext context)
[AfterScenario(Order = -1)]
public void UpdateAllureTestCaseName()
{
context.TryGetValue(out TestResult testresult);
AllureLifecycle.Instance.UpdateTestCase(testresult.uuid, testCase =>
AllureLifecycle.Instance.UpdateTestCase(testCase =>
{
testCase.name += GetScenarioNameSuffix();
testCase.historyId = TestContext.CurrentContext.Test.FullName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Allure.Commons;
using Allure.Net.Commons;
using Aquality.WinAppDriver.Applications;
using Aquality.WinAppDriver.Template.Utilities;
using AqualityTracking.Integrations.Core;
Expand All @@ -8,16 +8,9 @@
namespace Aquality.WinAppDriver.Template.SpecFlow.Hooks
{
[Binding]
public class ScreenshotHooks
public class ScreenshotHooks(ScreenshotProvider screenshotProvider)
{
private readonly ScreenshotProvider screenshotProvider;
private readonly ScenarioContext scenarioContext;

public ScreenshotHooks(ScenarioContext scenarioContext, ScreenshotProvider screenshotProvider)
{
this.scenarioContext = scenarioContext;
this.screenshotProvider = screenshotProvider;
}
private readonly ScreenshotProvider screenshotProvider = screenshotProvider;

[AfterScenario(Order = 0)]
public void TakeScreenshot()
Expand All @@ -26,7 +19,7 @@ public void TakeScreenshot()
{
var pathToScreenshot = screenshotProvider.TakeScreenshot();
TestContext.AddTestAttachment(pathToScreenshot);
AllureLifecycle.Instance.AddAttachment(pathToScreenshot, "Screenshot");
AllureApi.AddAttachment(pathToScreenshot, "Screenshot");
AqualityTrackingLifecycle.Instance.AddAttachment(pathToScreenshot);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Aquality.WinAppDriver" Version="1.3.0" />
<PackageReference Include="Aquality.WinAppDriver" Version="2.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@
},
"elementCache": {
"isEnabled": true
},
"visualization": {
"defaultThreshold": 0.03,
"comparisonWidth": 16,
"comparisonHeight": 16,
"pathToDumps": "../../../Resources/VisualDumps/"
}
}

0 comments on commit fe22040

Please sign in to comment.