Skip to content

Commit

Permalink
Update templates
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmcroft committed Mar 11, 2024
1 parent 10f4dba commit 705d43b
Show file tree
Hide file tree
Showing 20 changed files with 105 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
global using Legerity;
global using Legerity.Android;
global using Legerity.Pages;
global using NUnit.Framework;
global using NUnit.Framework;
global using OpenQA.Selenium;
global using OpenQA.Selenium.Remote;
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,23 @@

<ItemGroup>
<PackageReference Include="Appium.WebDriver" Version="5.0.0-rc.6" />
<PackageReference Include="Legerity.Android" Version="*" />
<PackageReference Include="Legerity.Core" Version="*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="nunit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
<Folder Include="Elements\" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<ProjectReference Include="..\..\..\..\src\Legerity.Android\Legerity.Android.csproj" />
<ProjectReference Include="..\..\..\..\src\Legerity.Core\Legerity.Core.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' != 'Debug'">
<PackageReference Include="Legerity.Android" Version="*" />
<PackageReference Include="Legerity.Core" Version="*" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public SamplePage()
{
}

public SamplePage(RemoteWebDriver app)
public SamplePage(WebDriver app)
: base(app, BaseTestClass.ImplicitWait)
{
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Legerity.Templates.Android.NUnit.Tests;

using Legerity.Templates.Android.NUnit.Pages;
using OpenQA.Selenium;
using OpenQA.Selenium.Remote;

[TestFixtureSource(nameof(PlatformOptions))]
Expand All @@ -14,7 +15,7 @@ public SampleTests(AppManagerOptions options)
[Test]
public void ShouldLoadPage()
{
RemoteWebDriver app = this.StartApp();
WebDriver app = this.StartApp();
new SamplePage(app).VerifyPageLoaded();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
global using Legerity.Web;
global using Legerity.Windows;
global using Legerity.Pages;
global using NUnit.Framework;
global using NUnit.Framework;
global using OpenQA.Selenium;
global using OpenQA.Selenium.Remote;
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,31 @@

<ItemGroup>
<PackageReference Include="Appium.WebDriver" Version="5.0.0-rc.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="nunit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
<Folder Include="Elements\" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<ProjectReference Include="..\..\..\..\src\Legerity.Android\Legerity.Android.csproj" />
<ProjectReference Include="..\..\..\..\src\Legerity.Core\Legerity.Core.csproj" />
<ProjectReference Include="..\..\..\..\src\Legerity.IOS\Legerity.IOS.csproj" />
<ProjectReference Include="..\..\..\..\src\Legerity.Web\Legerity.Web.csproj" />
<ProjectReference Include="..\..\..\..\src\Legerity.Windows\Legerity.Windows.csproj" />
<ProjectReference Include="..\..\..\..\src\Legerity.WinUI\Legerity.WinUI.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' != 'Debug'">
<PackageReference Include="Legerity.Android" Version="*" />
<PackageReference Include="Legerity.Core" Version="*" />
<PackageReference Include="Legerity.IOS" Version="*" />
<PackageReference Include="Legerity.Web" Version="*" />
<PackageReference Include="Legerity.Windows" Version="*" />
<PackageReference Include="Legerity.WinUI" Version="*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
<Folder Include="Elements\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public SamplePage()
{
}

public SamplePage(RemoteWebDriver app)
public SamplePage(WebDriver app)
: base(app, BaseTestClass.ImplicitWait)
{
}
Expand All @@ -33,9 +33,9 @@ private By DetermineTrait()
{
return this.App switch
{
WindowsDriver<WindowsElement> => WindowsByExtras.AutomationId("sampleButton"),
AndroidDriver<AndroidElement> => By.Id("sampleButton"),
IOSDriver<IOSElement> => By.Name("sampleButton"),
WindowsDriver => WindowsByExtras.AutomationId("sampleButton"),
AndroidDriver => By.Id("sampleButton"),
IOSDriver => By.Name("sampleButton"),
_ => By.TagName("button")
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public SampleTests(AppManagerOptions options)
[Test]
public void ShouldLoadPage()
{
RemoteWebDriver app = this.StartApp();
WebDriver app = this.StartApp();
new SamplePage(app).VerifyPageLoaded();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
global using Legerity;
global using Legerity.IOS;
global using Legerity.Pages;
global using NUnit.Framework;
global using NUnit.Framework;
global using OpenQA.Selenium;
global using OpenQA.Selenium.Remote;
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,23 @@

<ItemGroup>
<PackageReference Include="Appium.WebDriver" Version="5.0.0-rc.6" />
<PackageReference Include="Legerity.Core" Version="*" />
<PackageReference Include="Legerity.IOS" Version="*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="nunit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
<Folder Include="Elements\" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<ProjectReference Include="..\..\..\..\src\Legerity.Core\Legerity.Core.csproj" />
<ProjectReference Include="..\..\..\..\src\Legerity.IOS\Legerity.IOS.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' != 'Debug'">
<PackageReference Include="Legerity.Core" Version="*" />
<PackageReference Include="Legerity.IOS" Version="*" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public SamplePage()
{
}

public SamplePage(RemoteWebDriver app)
public SamplePage(WebDriver app)
: base(app, BaseTestClass.ImplicitWait)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public SampleTests(AppManagerOptions options)
[Test]
public void ShouldLoadPage()
{
RemoteWebDriver app = this.StartApp();
WebDriver app = this.StartApp();
new SamplePage(app).VerifyPageLoaded();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
global using Legerity;
global using Legerity.Pages;
global using Legerity.Web;
global using NUnit.Framework;
global using NUnit.Framework;
global using OpenQA.Selenium;
global using OpenQA.Selenium.Remote;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
Expand All @@ -7,16 +7,24 @@

<ItemGroup>
<PackageReference Include="Appium.WebDriver" Version="5.0.0-rc.6" />
<PackageReference Include="Legerity.Core" Version="*" />
<PackageReference Include="Legerity.Web" Version="*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="108.0.5359.7100" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="nunit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="122.0.6261.11100" />
</ItemGroup>

<ItemGroup>
<Folder Include="Elements\" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<ProjectReference Include="..\..\..\..\src\Legerity.Core\Legerity.Core.csproj" />
<ProjectReference Include="..\..\..\..\src\Legerity.Web\Legerity.Web.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' != 'Debug'">
<PackageReference Include="Legerity.Core" Version="*" />
<PackageReference Include="Legerity.Web" Version="*" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public SamplePage()
{
}

public SamplePage(RemoteWebDriver app)
public SamplePage(WebDriver app)
: base(app, BaseTestClass.ImplicitWait)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public SampleTests(AppManagerOptions options)
[Test]
public void ShouldLoadPage()
{
RemoteWebDriver app = this.StartApp();
WebDriver app = this.StartApp();
new SamplePage(app).VerifyPageLoaded();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
global using Legerity;
global using Legerity.Pages;
global using Legerity.Windows;
global using NUnit.Framework;
global using NUnit.Framework;
global using OpenQA.Selenium;
global using OpenQA.Selenium.Remote;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
Expand All @@ -7,16 +7,25 @@

<ItemGroup>
<PackageReference Include="Appium.WebDriver" Version="5.0.0-rc.6" />
<PackageReference Include="Legerity.Core" Version="*" />
<PackageReference Include="Legerity.Windows" Version="*" />
<PackageReference Include="Legerity.WinUI" Version="*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="nunit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
<Folder Include="Elements\" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<ProjectReference Include="..\..\..\..\src\Legerity.Core\Legerity.Core.csproj" />
<ProjectReference Include="..\..\..\..\src\Legerity.Windows\Legerity.Windows.csproj" />
<ProjectReference Include="..\..\..\..\src\Legerity.WinUI\Legerity.WinUI.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' != 'Debug'">
<PackageReference Include="Legerity.Core" Version="*" />
<PackageReference Include="Legerity.Windows" Version="*" />
<PackageReference Include="Legerity.WinUI" Version="*" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public SamplePage()
{
}

public SamplePage(RemoteWebDriver app)
public SamplePage(WebDriver app)
: base(app, BaseTestClass.ImplicitWait)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public SampleTests(AppManagerOptions options)
[Test]
public void ShouldLoadPage()
{
RemoteWebDriver app = this.StartApp();
WebDriver app = this.StartApp();
new SamplePage(app).VerifyPageLoaded();
}
}

0 comments on commit 705d43b

Please sign in to comment.