This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2674.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using System.Collections.Generic; | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Internals; | ||
|
||
#if UITEST | ||
using Xamarin.Forms.Core.UITests; | ||
using Xamarin.UITest; | ||
using NUnit.Framework; | ||
#endif | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
#if UITEST | ||
[Category(UITestCategories.Picker)] | ||
#endif | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Github, 2674, "Exception occurs when giving null values in picker itemsource collection", PlatformAffected.All)] | ||
public class Issue2674 : TestContentPage | ||
{ | ||
protected override void Init() | ||
{ | ||
var _picker = new Picker() | ||
{ | ||
ItemsSource = new List<string> { "cat", null, "rabbit" }, | ||
AutomationId = "picker", | ||
}; | ||
|
||
Content = new StackLayout() | ||
{ | ||
Children = | ||
{ | ||
_picker | ||
} | ||
}; | ||
} | ||
|
||
#if UITEST | ||
[Test] | ||
public void Issue2674Test() | ||
{ | ||
RunningApp.Screenshot("I am at Issue2674"); | ||
RunningApp.WaitForElement("picker"); | ||
} | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters