Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #115

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
3d18cd3
Create dependabot.yml
joecare99 Jan 12, 2025
658ecbf
Update dependabot.yml
joecare99 Jan 12, 2025
7b0ddbb
Bump xunit from 2.4.2 to 2.9.3 in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
f52316b
Bump CommunityToolkit.Mvvm from 8.2.0 to 8.4.0 in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
5d8bd2f
Bump xunit.runner.visualstudio in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
0fd90cf
Bump Avalonia and Avalonia.Desktop in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
07e42c7
Merge pull request #1 from joecare99/dependabot/nuget/src/Avalonia.Sa…
joecare99 Jan 12, 2025
9d02c6d
Bump Avalonia and Avalonia.Diagnostics in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
8156aae
Bump NUnit.Analyzers from 3.6.1 to 4.6.0 in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
d6ba62a
Merge pull request #2 from joecare99/dependabot/nuget/src/Avalonia.Sa…
joecare99 Jan 12, 2025
c004ef5
Bump Appium.WebDriver from 4.4.5 to 7.0.0 in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
47f3166
Bump Avalonia.Headless.XUnit in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
037ce4d
Bump Avalonia and Avalonia.Fonts.Inter in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
d2f3c09
Bump NUnit3TestAdapter from 4.2.1 to 4.6.0 in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
6d05431
Bump NUnit from 3.13.3 to 4.3.2 in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
8cd68d0
Bump Avalonia.Headless.NUnit and NUnit in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
a30f8b3
Bump coverlet.collector from 6.0.0 to 6.0.3 in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
fcc0e86
Bump Microsoft.NET.Test.Sdk in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
5d377b1
Merge branch 'main' into dependabot/nuget/src/Avalonia.Samples/Depend…
joecare99 Jan 12, 2025
8a0a3ed
Merge pull request #3 from joecare99/dependabot/nuget/src/Avalonia.Sa…
joecare99 Jan 12, 2025
dc88340
Bump Avalonia and Avalonia.ReactiveUI in /src/Avalonia.Samples
dependabot[bot] Jan 12, 2025
a900052
Merge pull request #4 from joecare99/dependabot/nuget/src/Avalonia.Sa…
joecare99 Jan 12, 2025
e496899
Merge branch 'main' into dependabot/nuget/src/Avalonia.Samples/Depend…
joecare99 Jan 12, 2025
8423792
Merge pull request #5 from joecare99/dependabot/nuget/src/Avalonia.Sa…
joecare99 Jan 12, 2025
e6a8cbe
Merge pull request #7 from joecare99/dependabot/nuget/src/Avalonia.Sa…
joecare99 Jan 12, 2025
38bcfc1
Merge pull request #8 from joecare99/dependabot/nuget/src/Avalonia.Sa…
joecare99 Jan 12, 2025
9ee6451
Merge pull request #9 from joecare99/dependabot/nuget/src/Avalonia.Sa…
joecare99 Jan 12, 2025
b37962f
Merge pull request #10 from joecare99/main
joecare99 Jan 12, 2025
3ca2a5a
Merge branch 'main' into dependabot/nuget/src/Avalonia.Samples/Depend…
joecare99 Jan 12, 2025
390e112
Merge pull request #11 from joecare99/dependabot/nuget/src/Avalonia.S…
joecare99 Jan 12, 2025
892df94
Merge pull request #12 from joecare99/dependabot/nuget/src/Avalonia.S…
joecare99 Jan 12, 2025
1616825
Merge pull request #13 from joecare99/dependabot/nuget/src/Avalonia.S…
joecare99 Jan 12, 2025
8757d9b
Merge pull request #14 from joecare99/dependabot/nuget/src/Avalonia.S…
joecare99 Jan 12, 2025
71df5b5
Merge branch 'dependabot/nuget/src/Avalonia.Samples/Dependabot/Micros…
joecare99 Jan 12, 2025
952eb6d
Merge pull request #15 from joecare99/dependabot/nuget/src/Avalonia.S…
joecare99 Jan 12, 2025
0534dbf
Merge pull request #16 from joecare99/dependabot/nuget/src/Avalonia.S…
joecare99 Jan 12, 2025
6973681
Merge branch 'dependabot/nuget/src/Avalonia.Samples/Dependabot/multi-…
joecare99 Jan 12, 2025
999fef9
Merge pull request #17 from joecare99/dependabot/nuget/src/Avalonia.S…
joecare99 Jan 12, 2025
cdc0777
Merge branch 'Update-Dependencies' into dependabot/nuget/src/Avalonia…
joecare99 Jan 12, 2025
1fa465e
Merge pull request #18 from joecare99/dependabot/nuget/src/Avalonia.S…
joecare99 Jan 12, 2025
5055f7f
Merge pull request #19 from joecare99/main
joecare99 Jan 12, 2025
787d9a6
Add distinct JSON package to address Security-vulnerability
joecare99 Jan 12, 2025
3934801
Update Dependencies, Handle issue #114
joecare99 Jan 12, 2025
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
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/src/Avalonia.Samples" # Location of package manifests
schedule:
interval: "weekly"
target-branch: "Dependabot"
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
</PropertyGroup>

<ItemGroup>
<AvaloniaResource Include="Assets\**"/>
<AvaloniaResource Include="Assets\**" />
</ItemGroup>


<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.5"/>
<PackageReference Include="Avalonia.Desktop" Version="11.0.5"/>
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.5"/>
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.5"/>
<PackageReference Include="Avalonia" Version="11.2.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.3" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.3" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.5"/>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.0" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0" />
<PackageReference Include="Avalonia" Version="11.2.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.3" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.3" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
</PropertyGroup>

<ItemGroup>
<AvaloniaResource Include="Assets\**"/>
<AvaloniaResource Include="Assets\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.10"/>
<PackageReference Include="Avalonia.Desktop" Version="11.0.10"/>
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.10"/>
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.10"/>
<PackageReference Include="Avalonia" Version="11.2.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.3" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.3" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.10"/>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1"/>
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0" />
<PackageReference Include="Avalonia" Version="11.2.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.3" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.3" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0" />
<PackageReference Include="Avalonia" Version="11.2.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.3" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.3" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0" />
<PackageReference Include="Avalonia" Version="11.2.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.3" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.3" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
</Project>
8 changes: 4 additions & 4 deletions src/Avalonia.Samples/Drawing/BattleCity/BattleCity.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<AvaloniaResource Include="Assets\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0" />
<PackageReference Include="Avalonia" Version="11.2.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.3" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
</ItemGroup>
</Project>
13 changes: 7 additions & 6 deletions src/Avalonia.Samples/Drawing/RectPainter/RectPainter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.0" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0" />
<PackageReference Include="Avalonia" Version="11.2.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.3" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.3" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
</Project>
11 changes: 6 additions & 5 deletions src/Avalonia.Samples/MVVM/BasicMvvmSample/BasicMvvmSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0" />
<PackageReference Include="Avalonia" Version="11.2.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.3" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.3" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
Copy link
Member

Choose a reason for hiding this comment

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

System.Text.Json is not even used in any of these samples, except ToDo sample:

Copy link
Member

Choose a reason for hiding this comment

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

And even there it depends on the SDK, and not nuget package. So SDK should be updated instead. Or TargetFramework. Or both.

Copy link
Author

Choose a reason for hiding this comment

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

Yes and no, take a look at the nuget-manager in Visual Studio this way even the transient packages are shifted to this version. Yes, the SDK should be updated (by M$), but these old ones are only used if you don't tell the system otherwise. (like I did)

</ItemGroup>
</Project>
11 changes: 6 additions & 5 deletions src/Avalonia.Samples/MVVM/CommandSample/CommandSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0" />
<PackageReference Include="Avalonia" Version="11.2.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.3" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.3" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0" />
<PackageReference Include="Avalonia" Version="11.2.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.3" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.3" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
<PropertyGroup>
<PathMap>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))=./</PathMap>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0" />
<PackageReference Include="Avalonia" Version="11.2.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.3" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.3" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0" />
<PackageReference Include="Avalonia" Version="11.2.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.3" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.3" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
</Project>
20 changes: 11 additions & 9 deletions src/Avalonia.Samples/Testing/TestableApp.Appium/CalculatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace TestableApp.Appium;
[Collection("Default")]
public class CalculatorTests
{
private readonly AppiumDriver<AppiumWebElement> _session;
private readonly AppiumDriver _session;


public CalculatorTests(DefaultAppFixture fixture)
Expand All @@ -18,10 +18,11 @@ public CalculatorTests(DefaultAppFixture fixture)
public void Should_Add_Numbers()
{
// Assert:
var firstOperandInput = _session.FindElementByAccessibilityId("FirstOperandInput")!;
var secondOperandInput = _session.FindElementByAccessibilityId("SecondOperandInput")!;
var addButton = _session.FindElementByAccessibilityId("AddButton")!;
var resultBox = _session.FindElementByAccessibilityId("ResultBox")!;
const string ByAccessibilityId = "AccessibilityId";
var firstOperandInput = _session.FindElement(ByAccessibilityId, "FirstOperandInput")!;
var secondOperandInput = _session.FindElement(ByAccessibilityId, "SecondOperandInput")!;
var addButton = _session.FindElement(ByAccessibilityId, "AddButton")!;
var resultBox = _session.FindElement(ByAccessibilityId, "ResultBox")!;

// Act:
firstOperandInput.Clear();
Expand All @@ -39,10 +40,11 @@ public void Should_Add_Numbers()
public void Cannot_Divide_By_Zero()
{
// Assert:
var firstOperandInput = _session.FindElementByAccessibilityId("FirstOperandInput")!;
var secondOperandInput = _session.FindElementByAccessibilityId("SecondOperandInput")!;
var divideButton = _session.FindElementByAccessibilityId("DivideButton")!;
var resultBox = _session.FindElementByAccessibilityId("ResultBox")!;
const string ByAccessibilityId = "AccessibilityId";
var firstOperandInput = _session.FindElement(ByAccessibilityId, "FirstOperandInput")!;
var secondOperandInput = _session.FindElement("AccessibilityId", "SecondOperandInput")!;
var divideButton = _session.FindElement("AccessibilityId", "DivideButton")!;
var resultBox = _session.FindElement("AccessibilityId", "ResultBox")!;

// Act:
firstOperandInput.Clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public DefaultAppFixture()
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
ConfigureWin32Options(options);
Session = new WindowsDriver<AppiumWebElement>(
Session = new WindowsDriver(
new Uri("http://127.0.0.1:4723"),
options);

Expand All @@ -40,7 +40,7 @@ public DefaultAppFixture()
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
ConfigureMacOptions(options);
Session = new MacDriver<AppiumWebElement>(
Session = new MacDriver(
new Uri("http://127.0.0.1:4723/wd/hub"),
options);
}
Expand All @@ -53,22 +53,22 @@ public DefaultAppFixture()
protected virtual void ConfigureWin32Options(AppiumOptions options)
{
var path = Path.GetFullPath(TestAppPath);
options.AddAdditionalCapability(MobileCapabilityType.App, path);
options.AddAdditionalCapability(MobileCapabilityType.PlatformName, MobilePlatform.Windows);
options.AddAdditionalCapability(MobileCapabilityType.DeviceName, "WindowsPC");
options.App = path;
options.PlatformName = MobilePlatform.Windows;
options.DeviceName= "WindowsPC";
// options.AddAdditionalCapability("appArguments", "--customArg");
}

protected virtual void ConfigureMacOptions(AppiumOptions options)
{
options.AddAdditionalCapability("appium:bundleId", TestAppBundleId);
options.AddAdditionalCapability(MobileCapabilityType.PlatformName, MobilePlatform.MacOS);
options.AddAdditionalCapability(MobileCapabilityType.AutomationName, "mac2");
options.AddAdditionalCapability("appium:showServerLogs", true);
options.AddAdditionalOption("appium:bundleId", TestAppBundleId);
options.PlatformName = MobilePlatform.MacOS;
options.AutomationName = "mac2";
options.AddAdditionalOption("appium:showServerLogs", true);
// options.AddAdditionalCapability("appium:arguments", new[] { "--customArg" });
}

public AppiumDriver<AppiumWebElement> Session { get; }
public AppiumDriver Session { get; }

public void Dispose()
{
Expand Down
Loading