summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2017-08-22 13:55:49 (GMT)
committerRui Marinho <me@ruimarinho.net>2017-08-29 13:42:35 (GMT)
commitb0a6d74e1e7746ab3605c91d1ae48b2b67325d18 (patch)
tree771e6cac15623c61e1880cce3e45abcb12d5b284 /Xamarin.Forms.Controls.Issues
parentddbe24917048341d0958693ebae0b58fc282305d (diff)
downloadxamarin-forms-b0a6d74e1e7746ab3605c91d1ae48b2b67325d18.zip
xamarin-forms-b0a6d74e1e7746ab3605c91d1ae48b2b67325d18.tar.gz
xamarin-forms-b0a6d74e1e7746ab3605c91d1ae48b2b67325d18.tar.bz2
Fix NRE when removing multiple pages in NavigationPageRenderer (#1108)
* Update 53179 test to remove 2 pages; fix for NRE when removing two pages with Android Support 25+ * Add missing step to UI test
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla53179.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla53179.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla53179.cs
index 12aa823..3c80f1c 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla53179.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla53179.cs
@@ -19,7 +19,7 @@ namespace Xamarin.Forms.Controls.Issues
public TestPage(int index)
{
nextBtn = new Button { Text = "Next Page" };
- rmBtn = new Button { Text = "Remove previous page" };
+ rmBtn = new Button { Text = "Remove previous pages" };
popBtn = new Button { Text = "Back" };
nextBtn.Clicked += async (sender, e) => await Navigation.PushAsync(new TestPage(index + 1));
@@ -27,6 +27,10 @@ namespace Xamarin.Forms.Controls.Issues
{
var stackSize = Navigation.NavigationStack.Count;
Navigation.RemovePage(Navigation.NavigationStack[stackSize - 2]);
+
+ stackSize = Navigation.NavigationStack.Count;
+ Navigation.RemovePage(Navigation.NavigationStack[stackSize - 2]);
+
popBtn.IsVisible = true;
rmBtn.IsVisible = false;
};
@@ -34,7 +38,7 @@ namespace Xamarin.Forms.Controls.Issues
switch (index)
{
- case 3:
+ case 4:
nextBtn.IsVisible = false;
popBtn.IsVisible = false;
break;
@@ -72,8 +76,11 @@ namespace Xamarin.Forms.Controls.Issues
RunningApp.WaitForElement(q => q.Marked("Next Page"));
RunningApp.Tap(q => q.Marked("Next Page"));
- RunningApp.WaitForElement(q => q.Marked("Remove previous page"));
- RunningApp.Tap(q => q.Marked("Remove previous page"));
+ RunningApp.WaitForElement(q => q.Marked("Next Page"));
+ RunningApp.Tap(q => q.Marked("Next Page"));
+
+ RunningApp.WaitForElement(q => q.Marked("Remove previous pages"));
+ RunningApp.Tap(q => q.Marked("Remove previous pages"));
RunningApp.WaitForElement(q => q.Marked("Back"));
RunningApp.Tap(q => q.Marked("Back"));