summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@gmail.com>2017-08-10 22:41:05 (GMT)
committerE.Z. Hart <hartez@gmail.com>2017-08-10 22:42:41 (GMT)
commit9adeedceb96d918745fa9a19e72869f153c9e01b (patch)
tree5118d97904bad344c464f124d1ad645020276c03 /Xamarin.Forms.Controls.Issues
parent44c6ccdd6bbd881b4054b6542d2a07572e7ec326 (diff)
downloadxamarin-forms-9adeedceb96d918745fa9a19e72869f153c9e01b.zip
xamarin-forms-9adeedceb96d918745fa9a19e72869f153c9e01b.tar.gz
xamarin-forms-9adeedceb96d918745fa9a19e72869f153c9e01b.tar.bz2
Add check to avoid running AppCompat-specific tests on pre-AppCompat
Fix race conditions in tests running agaist FormsApplicationActivity
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35132.cs2
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla40333.cs12
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs2
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TestPages/TestPages.cs11
4 files changed, 25 insertions, 2 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35132.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35132.cs
index 5dd7e5f..732c0a9 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35132.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35132.cs
@@ -76,9 +76,11 @@ namespace Xamarin.Forms.Controls.Issues
{
RunningApp.WaitForElement (q => q.Marked ("Open"));
RunningApp.Tap(q => q.Marked ("Open"));
+ RunningApp.WaitForElement (q => q.Marked ("Testing..."));
RunningApp.Back();
RunningApp.WaitForElement (q => q.Marked ("Open"));
RunningApp.Tap(q => q.Marked ("Open"));
+ RunningApp.WaitForElement (q => q.Marked ("Testing..."));
RunningApp.Back();
RunningApp.WaitForElement (q => q.Marked ("Open"));
RunningApp.Tap(q => q.Marked ("Open"));
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla40333.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla40333.cs
index 5d42253..c14ba45 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla40333.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla40333.cs
@@ -198,9 +198,19 @@ namespace Xamarin.Forms.Controls.Issues
#if __ANDROID__ // These tests don't work in iOS for unrelated reasons (see https://bugzilla.xamarin.com/show_bug.cgi?id=41085)
+ static void IgnoreFormsApplicationActivity()
+ {
+ if (AppSetup.IsFormsApplicationActivity)
+ {
+ Assert.Ignore("This test only applies to FormsAppCompatActivity.");
+ }
+ }
+
[Test]
public void ClickingOnMenuItemInMasterDoesNotCrash_NavPageVersion()
{
+ IgnoreFormsApplicationActivity();
+
RunningApp.Tap(q => q.Marked(StartNavPageTestId));
RunningApp.WaitForElement(q => q.Marked(OpenMasterId));
@@ -214,6 +224,8 @@ namespace Xamarin.Forms.Controls.Issues
[Test]
public void ClickingOnMenuItemInMasterDoesNotCrash_TabPageVersion()
{
+ IgnoreFormsApplicationActivity();
+
RunningApp.Tap(q => q.Marked(StartTabPageTestId));
RunningApp.WaitForElement(q => q.Marked(OpenMasterId));
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs
index f9f227c..61157fe 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs
@@ -40,7 +40,7 @@ namespace Xamarin.Forms.Controls.Issues
{
#if __ANDROID__
//show secondary menu
- RunningApp.Tap (c => c.Class ("android.support.v7.widget.ActionMenuPresenter$OverflowMenuButton"));
+ RunningApp.Tap (c => c.Class ("OverflowMenuButton"));
#endif
}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TestPages/TestPages.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TestPages/TestPages.cs
index eb268c5..3c21d5d 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TestPages/TestPages.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TestPages/TestPages.cs
@@ -56,8 +56,17 @@ namespace Xamarin.Forms.Controls
#if __ANDROID__
static IApp InitializeAndroidApp()
{
- return ConfigureApp.Android.ApkFile(AppPaths.ApkPath).Debug().StartApp();
+ var app = ConfigureApp.Android.ApkFile(AppPaths.ApkPath).Debug().StartApp();
+
+ if (bool.Parse((string)app.Invoke("IsPreAppCompat")))
+ {
+ IsFormsApplicationActivity = true;
+ }
+
+ return app;
}
+
+ public static bool IsFormsApplicationActivity { get; private set; }
#endif
#if __IOS__