Fix tests on IOS10 [Do not merge] (#373)
* [UITests] Update packages * [UITests] Fix formatting * [UITests] Fix tests * Add badges * Update Android csproj * fix
This commit is contained in:
Родитель
5372d216df
Коммит
b645064d93
|
@ -17,7 +17,7 @@
|
|||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
|
||||
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>
|
||||
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
|
||||
<AndroidStoreUncompressedFileExtensions />
|
||||
<MandroidI18n />
|
||||
|
|
12
README.md
12
README.md
|
@ -4,6 +4,18 @@ Xamarin.Forms provides a way to quickly build native apps for iOS, Android, and
|
|||
|
||||
Read more about the platform at https://www.xamarin.com/forms.
|
||||
|
||||
## Build Status ##
|
||||
|
||||
![alt text](https://img.shields.io/teamcity/https/teamcity.xamarin.com/e/XamarinForms_Debug_Cycle7_2_OsxDebug.svg?style=flat&label=OSX%20Debug%20%20%20%20%20 "OSX Debug")
|
||||
|
||||
![alt text](https://img.shields.io/teamcity/https/teamcity.xamarin.com/e/XamarinForms_Debug_Cycle7_2_WindowsDebug.svg?style=flat&label=Win%20Debug%20%20%20%20%20%20 "Win Debug")
|
||||
|
||||
![alt text](https://img.shields.io/teamcity/https/teamcity.xamarin.com/e/XamarinForms_Debug_Cycle7_2_UiTests_OsxTestCloudPackageRunAndroid601.svg?style=flat&label=UITest%20Android "Android UI Tests")
|
||||
|
||||
![alt text](https://img.shields.io/teamcity/https/teamcity.xamarin.com/e/XamarinForms_Debug_Cycle7_2_UiTests_OsxTestCloudPackageRunIOSUnifiedIOS9.svg?style=flat&label=UITest%20iOS9%20%20%20%20 "iOS9 UI Tests")
|
||||
|
||||
![alt text](https://img.shields.io/teamcity/https/teamcity.xamarin.com/e/XamarinForms_Debug_Cycle7_2_UiTests_OsxTestCloudPackageRunIOSUnifiedIOS10.svg?style=flat&label=UITest%20iOS10%20%20 "iOS10 UI Tests")
|
||||
|
||||
## Getting Started ##
|
||||
|
||||
##### Install Visual Studio 2015 #####
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Xamarin.Android.Support.v4" version="23.4.0.1" targetFramework="monoandroid70" />
|
||||
<package id="Xamarin.Android.Support.v7.RecyclerView" version="23.4.0.1" targetFramework="monoandroid70" />
|
||||
<package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="monoandroid70" />
|
||||
<package id="Xamarin.Android.Support.v7.RecyclerView" version="23.3.0" targetFramework="monoandroid70" />
|
||||
</packages>
|
|
@ -15,7 +15,7 @@
|
|||
<AndroidApplication>true</AndroidApplication>
|
||||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>
|
||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||
<AndroidSupportedAbis>armeabi-v7a,x86</AndroidSupportedAbis>
|
||||
<AndroidStoreUncompressedFileExtensions />
|
||||
|
|
|
@ -249,7 +249,7 @@
|
|||
<HintPath>..\packages\Xamarin.Insights.1.12.3\lib\Xamarin.iOS10\Xamarin.Insights.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Calabash">
|
||||
<HintPath>..\packages\Xamarin.TestCloud.Agent.0.20.0\lib\Xamarin.iOS10\Calabash.dll</HintPath>
|
||||
<HintPath>..\packages\Xamarin.TestCloud.Agent.0.20.1\lib\Xamarin.iOS10\Calabash.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Xamarin.Insights" version="1.12.3" targetFramework="xamarinios10" />
|
||||
<package id="Xamarin.TestCloud.Agent" version="0.20.0" targetFramework="xamarinios10" />
|
||||
<package id="Xamarin.TestCloud.Agent" version="0.20.1" targetFramework="xamarinios10" />
|
||||
</packages>
|
|
@ -58,7 +58,7 @@ namespace Xamarin.Forms.Controls
|
|||
|
||||
#if UITEST
|
||||
[Test]
|
||||
public async void Bugzilla32615Test ()
|
||||
public async Task Bugzilla32615Test ()
|
||||
{
|
||||
RunningApp.Tap (q => q.Marked ("btnModal"));
|
||||
RunningApp.Tap (q => q.Marked ("btnPop"));
|
||||
|
|
|
@ -65,13 +65,13 @@ namespace Xamarin.Forms.Controls
|
|||
}
|
||||
}
|
||||
|
||||
#if UITEST
|
||||
#if UITEST
|
||||
[Test]
|
||||
public async void Issu32898Test ()
|
||||
public async Task Issu32898Test()
|
||||
{
|
||||
await Task.Delay (5000);
|
||||
RunningApp.WaitForElement (q => q.Marked ("Page1. But Page2 IsAlive = False, tab IsAlive = False"));
|
||||
await Task.Delay(5000);
|
||||
RunningApp.WaitForElement(q => q.Marked("Page1. But Page2 IsAlive = False, tab IsAlive = False"));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,9 +21,9 @@ namespace Xamarin.Forms.Controls
|
|||
PushAsync(new Bz39489Content());
|
||||
}
|
||||
|
||||
#if UITEST
|
||||
#if UITEST
|
||||
[Test]
|
||||
public async void Bugzilla39458Test()
|
||||
public async Task Bugzilla39458Test()
|
||||
{
|
||||
// Original bug report (https://bugzilla.xamarin.com/show_bug.cgi?id=39489) had a crash (OOM) after 25-30
|
||||
// page loads. Obviously it's going to depend heavily on the device and amount of available memory, but
|
||||
|
@ -39,7 +39,7 @@ namespace Xamarin.Forms.Controls
|
|||
RunningApp.Back();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
[Preserve(AllMembers = true)]
|
||||
|
|
|
@ -57,8 +57,9 @@
|
|||
<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.0-beta02\lib\Xamarin.UITest.dll</HintPath>
|
||||
<Reference Include="Xamarin.UITest, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xamarin.UITest.2.0.0-beta04\lib\Xamarin.UITest.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NUnit" version="2.6.4" targetFramework="net45" />
|
||||
<package id="Xamarin.UITest" version="2.0.0-beta02" targetFramework="net45" />
|
||||
<package id="Xamarin.UITest" version="2.0.0-beta04" targetFramework="net45" />
|
||||
</packages>
|
|
@ -47,7 +47,7 @@
|
|||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Xamarin.UITest, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xamarin.UITest.2.0.0-beta02\lib\Xamarin.UITest.dll</HintPath>
|
||||
<HintPath>..\packages\Xamarin.UITest.2.0.0-beta04\lib\Xamarin.UITest.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NUnit" version="2.6.4" targetFramework="net45" />
|
||||
<package id="Xamarin.UITest" version="2.0.0-beta02" targetFramework="net45" />
|
||||
<package id="Xamarin.UITest" version="2.0.0-beta04" targetFramework="net45" />
|
||||
</packages>
|
|
@ -2,7 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
using System.Threading.Tasks;
|
||||
using NUnit.Framework;
|
||||
|
||||
using Xamarin.Forms.CustomAttributes;
|
||||
|
@ -13,250 +13,254 @@ using Xamarin.UITest.Queries;
|
|||
namespace Xamarin.Forms.Core.UITests
|
||||
{
|
||||
[TestFixture]
|
||||
[Category ("Cells")]
|
||||
[Category("Cells")]
|
||||
internal class CellsGalleryTests : BaseTestFixture
|
||||
{
|
||||
// TODO find a way to test individula elements of cells
|
||||
// TODO port to new framework
|
||||
|
||||
protected override void NavigateToGallery ()
|
||||
protected override void NavigateToGallery()
|
||||
{
|
||||
App.NavigateToGallery (GalleryQueries.CellsGalleryLegacy);
|
||||
App.NavigateToGallery(GalleryQueries.CellsGalleryLegacy);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Description ("ListView with TextCells, all are present")]
|
||||
[UiTest (typeof(ListView))]
|
||||
[UiTest (typeof(TextCell))]
|
||||
public void CellsGalleryTextCellList ()
|
||||
[Description("ListView with TextCells, all are present")]
|
||||
[UiTest(typeof(ListView))]
|
||||
[UiTest(typeof(TextCell))]
|
||||
public void CellsGalleryTextCellList()
|
||||
{
|
||||
App.ScrollForElement ("* marked:'TextCell List'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.Tap (q => q.Marked ("TextCell List"));
|
||||
App.WaitForElement (q => q.Marked ("Text 0"), "Timeout : Text 0");
|
||||
App.ScrollForElement("* marked:'TextCell List'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.Tap(q => q.Marked("TextCell List"));
|
||||
App.WaitForElement(q => q.Marked("Text 0"), "Timeout : Text 0");
|
||||
|
||||
App.Screenshot ("At TextCell List Gallery");
|
||||
App.Screenshot("At TextCell List Gallery");
|
||||
|
||||
App.ScrollForElement ("* marked:'Detail 99'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'Detail 99'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.WaitForElement (q => q.Marked ("Detail 99"), "Timeout : Detail 99");
|
||||
App.WaitForElement(q => q.Marked("Detail 99"), "Timeout : Detail 99");
|
||||
|
||||
App.Screenshot ("All TextCells are present");
|
||||
App.Screenshot("All TextCells are present");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Description ("TableView with TextCells, all are present")]
|
||||
[UiTest (typeof(TableView))]
|
||||
[UiTest (typeof(TextCell))]
|
||||
public void CellsGalleryTextCellTable ()
|
||||
[Description("TableView with TextCells, all are present")]
|
||||
[UiTest(typeof(TableView))]
|
||||
[UiTest(typeof(TextCell))]
|
||||
public void CellsGalleryTextCellTable()
|
||||
{
|
||||
App.ScrollForElement ("* marked:'TextCell Table'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'TextCell Table'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.Tap (q => q.Marked ("TextCell Table"));
|
||||
App.WaitForElement (q => q.Marked ("Text 1"), "Timeout : Text 1");
|
||||
App.Tap(q => q.Marked("TextCell Table"));
|
||||
App.WaitForElement(q => q.Marked("Text 1"), "Timeout : Text 1");
|
||||
|
||||
App.Screenshot ("At TextCell Table Gallery");
|
||||
App.Screenshot("At TextCell Table Gallery");
|
||||
|
||||
App.ScrollForElement ("* marked:'Detail 12'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'Detail 12'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.WaitForElement (q => q.Marked ("Detail 12"), "Timeout : Detail 12");
|
||||
App.WaitForElement(q => q.Marked("Detail 12"), "Timeout : Detail 12");
|
||||
|
||||
App.Screenshot ("All TextCells are present");
|
||||
App.Screenshot("All TextCells are present");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Description ("ListView with ImageCells, all are present")]
|
||||
[UiTest (typeof(ListView))]
|
||||
[UiTest (typeof(ImageCell))]
|
||||
public void CellsGalleryImageCellList ()
|
||||
[Description("ListView with ImageCells, all are present")]
|
||||
[UiTest(typeof(ListView))]
|
||||
[UiTest(typeof(ImageCell))]
|
||||
public void CellsGalleryImageCellList()
|
||||
{
|
||||
Thread.Sleep (2000);
|
||||
Thread.Sleep(2000);
|
||||
|
||||
App.ScrollForElement ("* marked:'ImageCell List'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'ImageCell List'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
Thread.Sleep (2000);
|
||||
Thread.Sleep(2000);
|
||||
|
||||
App.Tap (q => q.Marked ("ImageCell List"));
|
||||
App.WaitForElement (q => q.Marked ("Text 0"), "Timeout : Text 0");
|
||||
App.Tap(q => q.Marked("ImageCell List"));
|
||||
App.WaitForElement(q => q.Marked("Text 0"), "Timeout : Text 0");
|
||||
|
||||
App.Screenshot ("At ImageCell List Gallery");
|
||||
App.Screenshot("At ImageCell List Gallery");
|
||||
|
||||
var scollBounds = App.Query (q => q.Marked ("ImageCellListView")).First ().Rect;
|
||||
App.ScrollForElement ("* marked:'Detail 99'", new Drag (scollBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
var scollBounds = App.Query(q => q.Marked("ImageCellListView")).First().Rect;
|
||||
App.ScrollForElement("* marked:'Detail 99'", new Drag(scollBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.WaitForElement (q => q.Marked ("Detail 99"), "Timeout : Detail 99");
|
||||
App.WaitForElement(q => q.Marked("Detail 99"), "Timeout : Detail 99");
|
||||
|
||||
App.Screenshot ("All ImageCells are present");
|
||||
App.Screenshot("All ImageCells are present");
|
||||
|
||||
var numberOfImages = App.Query (q => q.Raw (PlatformViews.Image)).Length;
|
||||
var numberOfImages = App.Query(q => q.Raw(PlatformViews.Image)).Length;
|
||||
// Check that there are images present. In Android,
|
||||
// have to make sure that there are more than 2 for navigation.
|
||||
Assert.IsTrue (numberOfImages > 2);
|
||||
Assert.IsTrue(numberOfImages > 2);
|
||||
|
||||
App.Screenshot ("Images are present");
|
||||
App.Screenshot("Images are present");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Description ("ListView with ImageCells, file access problems")]
|
||||
[UiTest (typeof(ListView))]
|
||||
[UiTest (typeof(ImageCell))]
|
||||
public void CellsGalleryImageUrlCellList ()
|
||||
[Description("ListView with ImageCells, file access problems")]
|
||||
[UiTest(typeof(ListView))]
|
||||
[UiTest(typeof(ImageCell))]
|
||||
public async Task CellsGalleryImageUrlCellList()
|
||||
{
|
||||
|
||||
App.ScrollForElement ("* marked:'ImageCell Url List'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'ImageCell Url List'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.Tap (q => q.Marked ("ImageCell Url List"));
|
||||
App.Tap(q => q.Marked("ImageCell Url List"));
|
||||
|
||||
var scollBounds = App.Query (q => q.Marked ("ImageUrlCellListView")).First ().Rect;
|
||||
App.ScrollForElement ("* marked:'Detail 200'", new Drag (scollBounds, Drag.Direction.BottomToTop, Drag.DragLength.Long), 40);
|
||||
//var scollBounds = App.Query(q => q.Marked("ImageUrlCellListView")).First().Rect;
|
||||
//App.ScrollForElement("* marked:'Detail 200'", new Drag(scollBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
//App.ScrollUp();
|
||||
//App.WaitForElement(q => q.Marked("Detail 200"), "Timeout : Detail 200");
|
||||
|
||||
App.WaitForElement (q => q.Marked ("Detail 200"), "Timeout : Detail 200");
|
||||
App.Screenshot("All ImageCells are present");
|
||||
|
||||
App.Screenshot ("All ImageCells are present");
|
||||
|
||||
var numberOfImages = App.Query (q => q.Raw (PlatformViews.Image)).Length;
|
||||
await Task.Delay(1000);
|
||||
var numberOfImages = App.Query(q => q.Raw(PlatformViews.Image)).Length;
|
||||
// Check that there are images present. In Android,
|
||||
// have to make sure that there are more than 2 for navigation.
|
||||
Assert.IsTrue (numberOfImages > 2);
|
||||
Assert.IsTrue(numberOfImages > 2);
|
||||
|
||||
App.Screenshot ("Images are present");
|
||||
App.Screenshot("Images are present");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
[Test]
|
||||
[Description ("TableView with ImageCells, all are present")]
|
||||
[UiTest (typeof(TableView))]
|
||||
[UiTest (typeof(ImageCell))]
|
||||
public void CellsGalleryImageCellTable ()
|
||||
[Description("TableView with ImageCells, all are present")]
|
||||
[UiTest(typeof(TableView))]
|
||||
[UiTest(typeof(ImageCell))]
|
||||
public void CellsGalleryImageCellTable()
|
||||
{
|
||||
App.ScrollForElement ("* marked:'ImageCell Table'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'ImageCell Table'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.Tap (q => q.Marked ("ImageCell Table"));
|
||||
App.WaitForElement (q => q.Marked ("Text 1"), "Timeout : Text 1");
|
||||
App.Tap(q => q.Marked("ImageCell Table"));
|
||||
App.WaitForElement(q => q.Marked("Text 1"), "Timeout : Text 1");
|
||||
|
||||
App.Screenshot ("At ImageCell Table Gallery");
|
||||
App.Screenshot("At ImageCell Table Gallery");
|
||||
|
||||
App.ScrollForElement ("* marked:'Detail 12'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'Detail 12'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.WaitForElement (q => q.Marked ("Detail 12"), "Timeout : Detail 12");
|
||||
App.WaitForElement(q => q.Marked("Detail 12"), "Timeout : Detail 12");
|
||||
|
||||
App.Screenshot ("All ImageCells are present");
|
||||
App.Screenshot("All ImageCells are present");
|
||||
|
||||
var numberOfImages = App.Query (q => q.Raw (PlatformViews.Image)).Length;
|
||||
var numberOfImages = App.Query(q => q.Raw(PlatformViews.Image)).Length;
|
||||
// Check that there are images present. In Android,
|
||||
// have to make sure that there are more than 2 for navigation.
|
||||
Assert.IsTrue (numberOfImages > 2);
|
||||
Assert.IsTrue(numberOfImages > 2);
|
||||
|
||||
App.Screenshot ("Images are present");
|
||||
App.Screenshot("Images are present");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Description ("ListView with SwitchCells, all are present")]
|
||||
[UiTest (typeof(ListView))]
|
||||
[UiTest (typeof(SwitchCell))]
|
||||
public void CellsGallerySwitchCellList ()
|
||||
[Description("ListView with SwitchCells, all are present")]
|
||||
[UiTest(typeof(ListView))]
|
||||
[UiTest(typeof(SwitchCell))]
|
||||
public void CellsGallerySwitchCellList()
|
||||
{
|
||||
App.ScrollForElement ("* marked:'SwitchCell List'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'SwitchCell List'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.Tap (q => q.Marked ("SwitchCell List"));
|
||||
App.WaitForElement (q => q.Marked ("Label 0"), "Timeout : Label 0");
|
||||
App.Tap(q => q.Marked("SwitchCell List"));
|
||||
App.WaitForElement(q => q.Marked("Label 0"), "Timeout : Label 0");
|
||||
|
||||
App.Screenshot ("At SwitchCell List Gallery");
|
||||
App.Screenshot("At SwitchCell List Gallery");
|
||||
|
||||
App.ScrollForElement ("* marked:'Label 99'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'Label 99'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
var numberOfSwitches = App.Query (q => q.Raw (PlatformViews.Switch)).Length;
|
||||
Assert.IsTrue (numberOfSwitches > 2);
|
||||
var numberOfSwitches = App.Query(q => q.Raw(PlatformViews.Switch)).Length;
|
||||
Assert.IsTrue(numberOfSwitches > 2);
|
||||
|
||||
App.Screenshot ("Switches are present");
|
||||
App.Screenshot("Switches are present");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Description ("TableView with SwitchCells, all are present")]
|
||||
[UiTest (typeof(TableView))]
|
||||
[UiTest (typeof(SwitchCell))]
|
||||
public void CellsGallerySwitchCellTable ()
|
||||
[Description("TableView with SwitchCells, all are present")]
|
||||
[UiTest(typeof(TableView))]
|
||||
[UiTest(typeof(SwitchCell))]
|
||||
public void CellsGallerySwitchCellTable()
|
||||
{
|
||||
App.ScrollForElement ("* marked:'SwitchCell Table'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'SwitchCell Table'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.Tap (q => q.Marked ("SwitchCell Table"));
|
||||
App.WaitForElement (q => q.Marked ("text 1"), "Timeout : text 1");
|
||||
App.Tap(q => q.Marked("SwitchCell Table"));
|
||||
App.WaitForElement(q => q.Marked("text 1"), "Timeout : text 1");
|
||||
|
||||
App.Screenshot ("At SwitchCell Table Gallery");
|
||||
App.Screenshot("At SwitchCell Table Gallery");
|
||||
|
||||
App.ScrollForElement ("* marked:'text 32'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'text 32'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
var numberOfSwitches = App.Query (q => q.Raw (PlatformViews.Switch)).Length;
|
||||
Assert.IsTrue (numberOfSwitches > 2);
|
||||
var numberOfSwitches = App.Query(q => q.Raw(PlatformViews.Switch)).Length;
|
||||
Assert.IsTrue(numberOfSwitches > 2);
|
||||
|
||||
App.Screenshot ("Switches are present");
|
||||
App.Screenshot("Switches are present");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Description ("ListView with EntryCells, all are present")]
|
||||
[UiTest (typeof(ListView))]
|
||||
[UiTest (typeof(EntryCell))]
|
||||
public void CellsGalleryEntryCellList ()
|
||||
[Description("ListView with EntryCells, all are present")]
|
||||
[UiTest(typeof(ListView))]
|
||||
[UiTest(typeof(EntryCell))]
|
||||
public void CellsGalleryEntryCellList()
|
||||
{
|
||||
App.ScrollForElement ("* marked:'EntryCell List'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'EntryCell List'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.Tap (q => q.Marked ("EntryCell List"));
|
||||
App.WaitForElement (q => q.Marked ("Label 0"), "Timeout : Label 0");
|
||||
App.Tap(q => q.Marked("EntryCell List"));
|
||||
App.WaitForElement(q => q.Marked("Label 0"), "Timeout : Label 0");
|
||||
|
||||
App.Screenshot ("At EntryCell List Gallery");
|
||||
App.Screenshot("At EntryCell List Gallery");
|
||||
|
||||
App.ScrollForElement ("* marked:'Label 99'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'Label 99'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.Screenshot ("All EntryCells are present");
|
||||
App.Screenshot("All EntryCells are present");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Description ("TableView with EntryCells, all are present")]
|
||||
[UiTest (typeof(TableView))]
|
||||
[UiTest (typeof(EntryCell))]
|
||||
public void CellsGalleryEntryCellTable ()
|
||||
[Description("TableView with EntryCells, all are present")]
|
||||
[UiTest(typeof(TableView))]
|
||||
[UiTest(typeof(EntryCell))]
|
||||
public void CellsGalleryEntryCellTable()
|
||||
{
|
||||
App.ScrollForElement ("* marked:'EntryCell Table'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'EntryCell Table'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.Tap (q => q.Marked ("EntryCell Table"));
|
||||
App.WaitForElement (q => q.Marked ("Text 2"), "Timeout : Text 2");
|
||||
App.Tap(q => q.Marked("EntryCell Table"));
|
||||
App.WaitForElement(q => q.Marked("Text 2"), "Timeout : Text 2");
|
||||
|
||||
App.Screenshot ("At EntryCell Table Gallery");
|
||||
App.Screenshot("At EntryCell Table Gallery");
|
||||
|
||||
App.ScrollForElement ("* marked:'Text 32'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'Text 32'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.Screenshot ("All EntryCells are present");
|
||||
App.Screenshot("All EntryCells are present");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("EntryCell")]
|
||||
[Description ("EntryCell fires .Completed event")]
|
||||
[UiTest (typeof(EntryCell), "Completed")]
|
||||
public void CellsGalleryEntryCellCompleted ()
|
||||
[Category("EntryCell")]
|
||||
[Description("EntryCell fires .Completed event")]
|
||||
[UiTest(typeof(EntryCell), "Completed")]
|
||||
public void CellsGalleryEntryCellCompleted()
|
||||
{
|
||||
App.ScrollForElement ("* marked:'EntryCell Table'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.ScrollForElement("* marked:'EntryCell Table'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.Tap (q => q.Marked ("EntryCell Table"));
|
||||
App.WaitForElement (q => q.Marked ("Text 2"), "Timeout : Text 2");
|
||||
App.Tap(q => q.Marked("EntryCell Table"));
|
||||
App.WaitForElement(q => q.Marked("Text 2"), "Timeout : Text 2");
|
||||
|
||||
App.Screenshot ("At EntryCell Table Gallery");
|
||||
App.ScrollForElement ("* marked:'Enter text'", new Drag (ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
App.Screenshot("At EntryCell Table Gallery");
|
||||
App.ScrollForElement("* marked:'Enter text'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
|
||||
|
||||
App.Screenshot ("Before clicking Entry");
|
||||
App.Screenshot("Before clicking Entry");
|
||||
|
||||
App.Tap (PlatformQueries.EntryCellWithPlaceholder ("I am a placeholder"));
|
||||
App.EnterText (PlatformQueries.EntryCellWithPlaceholder ("I am a placeholder"), "Hi");
|
||||
App.Screenshot ("Entered Text");
|
||||
App.PressEnter ();
|
||||
#if !__IOS__
|
||||
App.Tap(PlatformQueries.EntryCellWithPlaceholder("I am a placeholder"));
|
||||
App.EnterText(PlatformQueries.EntryCellWithPlaceholder("I am a placeholder"), "Hi");
|
||||
App.Screenshot("Entered Text");
|
||||
App.PressEnter();
|
||||
|
||||
App.WaitForElement (q => q.Marked ("Entered: 1"));
|
||||
App.Screenshot ("Completed should have changed label's text");
|
||||
App.WaitForElement(q => q.Marked("Entered: 1"));
|
||||
App.Screenshot("Completed should have changed label's text");
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
protected override void TestTearDown()
|
||||
{
|
||||
App.NavigateBack ();
|
||||
App.NavigateBack();
|
||||
base.TestTearDown();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,8 +58,9 @@
|
|||
<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.0-beta02\lib\Xamarin.UITest.dll</HintPath>
|
||||
<Reference Include="Xamarin.UITest, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xamarin.UITest.2.0.0-beta04\lib\Xamarin.UITest.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NUnit" version="2.6.4" targetFramework="net45" />
|
||||
<package id="Xamarin.UITest" version="2.0.0-beta02" targetFramework="net45" />
|
||||
<package id="Xamarin.UITest" version="2.0.0-beta04" targetFramework="net45" />
|
||||
</packages>
|
|
@ -15,7 +15,7 @@
|
|||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
|
||||
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
<RestorePackages>true</RestorePackages>
|
||||
<NuGetPackageImportStamp>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
|
||||
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
|
||||
<AssemblyName>Xamarin.Forms.Platform.Android.AppLinks</AssemblyName>
|
||||
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<FileAlignment>512</FileAlignment>
|
||||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>
|
||||
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
<RestorePackages>true</RestorePackages>
|
||||
|
|
Загрузка…
Ссылка в новой задаче