summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@gmail.com>2017-09-26 16:35:09 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:33:10 (GMT)
commit117b9e069377b22bf8de13c3e8082fc97c1eef1b (patch)
tree51fab95d4e1453cea32354e15fe65cad54d85b43 /Xamarin.Forms.Controls.Issues
parent85216c8b988264332d168d66a80bad2543072f79 (diff)
downloadxamarin-forms-117b9e069377b22bf8de13c3e8082fc97c1eef1b.zip
xamarin-forms-117b9e069377b22bf8de13c3e8082fc97c1eef1b.tar.gz
xamarin-forms-117b9e069377b22bf8de13c3e8082fc97c1eef1b.tar.bz2
Verify that the test is on screen before restarting
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/RestartAppTest.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/RestartAppTest.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/RestartAppTest.cs
index 85bd841..098b183 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/RestartAppTest.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/RestartAppTest.cs
@@ -20,25 +20,31 @@ namespace Xamarin.Forms.Controls.Issues
{
public const string ForceRestart = "ForceRestart";
public const string Success = "Success";
+ public const string RestartButton = "Restart";
protected override void Init()
{
+ var restartButton = new Button { Text = "Restart", AutomationId = RestartButton };
+ restartButton.Clicked += (sender, e) => MessagingCenter.Send(this, ForceRestart);
+
Content = new StackLayout
{
Padding = new Thickness(0, 20, 0, 0),
Children =
{
- new Label { Text = Success }
+ new Label { Text = Success },
+ restartButton
}
};
-
- MessagingCenter.Send(this, ForceRestart);
}
#if UITEST
[Test]
public void ForcingRestartDoesNotCauseCrash()
{
+ RunningApp.WaitForElement(RestartButton);
+ RunningApp.Tap(RestartButton);
+
// If the app hasn't crashed, this test has passed
RunningApp.WaitForElement(Success);
}