Skip to content

Commit bf42130

Browse files
Added the test case
1 parent f431390 commit bf42130

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
namespace Maui.Controls.Sample.Issues;
2+
3+
[Issue(IssueTracker.Github, 29633, "[Android] Picker Does Not Show Selected Item Highlight", PlatformAffected.Android)]
4+
public class Issue29633 : ContentPage
5+
{
6+
public Issue29633()
7+
{
8+
var items = new List<string>
9+
{
10+
"Apple", "Banana", "Cherry", "Date", "Elderberry",
11+
"Fig", "Grape", "Honeydew", "Kiwi", "Lemon"
12+
};
13+
14+
var picker = new Picker()
15+
{
16+
AutomationId = "HighlightPickerItem",
17+
ItemsSource = items,
18+
SelectedItem = items[6]
19+
};
20+
21+
Content = new StackLayout
22+
{
23+
Children =
24+
{
25+
picker
26+
}
27+
};
28+
}
29+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using NUnit.Framework;
2+
using UITest.Appium;
3+
using UITest.Core;
4+
5+
namespace Microsoft.Maui.TestCases.Tests.Issues;
6+
7+
public class Issue29633 : _IssuesUITest
8+
{
9+
public Issue29633(TestDevice testDevice) : base(testDevice)
10+
{
11+
}
12+
13+
public override string Issue => "[Android] Picker Does Not Show Selected Item Highlight";
14+
15+
[Test]
16+
[Category(UITestCategories.Picker)]
17+
public void PickerShouldShowSelectedItemHighlight()
18+
{
19+
App.WaitForElement("HighlightPickerItem");
20+
App.Click("HighlightPickerItem");
21+
VerifyScreenshot();
22+
}
23+
}

0 commit comments

Comments
 (0)