Skip to content

NUnit 3 Goodness! #5

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
11 changes: 7 additions & 4 deletions Xamarin.UITest.POPSample/AppManager.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System;
using System.IO;
using System.Reflection;
using Xamarin.UITest;

namespace Xamarin.UITest.POPSample
{
static class AppManager
{
const string ApkPath = "../../../Binaries/TaskyDroid.apk";
const string AppPath = "../../../Binaries/TaskyiOS.app";
const string IpaBundleId = "com.xamarin.samples.taskytouch";

static IApp app;
Expand Down Expand Up @@ -38,12 +38,15 @@ public static Platform Platform

public static void StartApp()
{
string assemblyFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string binariesFolder = Path.Combine(assemblyFolder, "..", "..", "..", "Binaries");

if (Platform == Platform.Android)
{
app = ConfigureApp
.Android
// Used to run a .apk file:
.ApkFile(ApkPath)
.ApkFile(Path.Combine(binariesFolder, "TaskyDroid.apk"))
.StartApp();
}

Expand All @@ -52,7 +55,7 @@ public static void StartApp()
app = ConfigureApp
.iOS
// Used to run a .app file on an ios simulator:
.AppBundle(AppPath)
.AppBundle(Path.Combine(binariesFolder, "TaskyiOS.app"))
// Used to run a .ipa file on a physical ios device:
//.InstalledApp(ipaBundleId)
.StartApp();
Expand Down
4 changes: 3 additions & 1 deletion Xamarin.UITest.POPSample/Pages/TaskDetailsPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public TaskDetailsPage EnterTask(string name, string notes = null)
{
if (OnAndroid)
{
app.EnterText(nameField, name);
app.Tap(nameField);
app.EnterText(name);
app.DismissKeyboard();

if (notes != null)
app.EnterText(notesField, notes);
Expand Down
18 changes: 10 additions & 8 deletions Xamarin.UITest.POPSample/Xamarin.UITest.POPSample.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -26,12 +26,6 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="Xamarin.UITest">
<HintPath>..\packages\Xamarin.UITest.2.0.9\lib\Xamarin.UITest.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AppManager.cs" />
Expand All @@ -44,7 +38,15 @@
<Compile Include="Tests\iOSOnlyTests.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<PackageReference Include="NUnit">
<Version>3.11.0</Version>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter">
<Version>3.13.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.UITest">
<Version>3.0.0-dev23</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
5 changes: 0 additions & 5 deletions Xamarin.UITest.POPSample/packages.config

This file was deleted.