Change identifier for search bar in tests to avoid confusing UITests (#3574)
authorE.Z. Hart <hartez@users.noreply.github.com>
Thu, 16 Aug 2018 17:41:53 +0000 (11:41 -0600)
committerRui Marinho <me@ruimarinho.net>
Thu, 16 Aug 2018 17:41:53 +0000 (18:41 +0100)
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/GestureBubblingTests.cs
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/InputTransparentTests.cs

index 8f2d1bf..53b0c37 100644 (file)
@@ -201,7 +201,9 @@ namespace Xamarin.Forms.Controls.Issues
                                LineBreakMode = LineBreakMode.WordWrap,
                                Text = "Lorem ipsum dolor sit amet"
                        }));
-                       col1.Children.Add(MenuButton(nameof(SearchBar), () => new SearchBar()));
+
+                       // We don't use 'SearchBar' here because on Android it sometimes finds the wrong control
+                       col1.Children.Add(MenuButton("TestSearchBar", () => new SearchBar()));
 
                        col2.Children.Add(MenuButton(nameof(DatePicker), () => new DatePicker()));
                        col2.Children.Add(MenuButton(nameof(TimePicker), () => new TimePicker()));
index 080acfb..809f80c 100644 (file)
@@ -186,7 +186,9 @@ namespace Xamarin.Forms.Controls.Issues
                                LineBreakMode = LineBreakMode.WordWrap,
                                Text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
                        }));
-                       col1.Children.Add(MenuButton(nameof(SearchBar), () => new SearchBar()));
+
+                       // We don't use 'SearchBar' here because on Android it sometimes finds the wrong control
+                       col1.Children.Add(MenuButton("TestSearchBar", () => new SearchBar()));
 
                        col2.Children.Add(MenuButton(nameof(DatePicker), () => new DatePicker()));
                        col2.Children.Add(MenuButton(nameof(TimePicker), () => new TimePicker()));