Repository navigation
[Windows] Replace Header with PlaceholderText for Title property of Picker
#33007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
946931b
95cffd0
2ae9b2a
06c890c
c733de0
93c2a47
c7fc5ab
61cf4b9
c3ff067
179a333
83925c0
142d93a
e2500bd
68e2e2a
8d146bc
6b9d640
798091c
c0fac3f
774396f
7f211cd
cc23b5b
d47a945
c89e2e3
3c02076
7c95d32
8cd9286
317960f
2c95990
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| namespace Maui.Controls.Sample.Issues; | ||
|
|
||
| [Issue(IssueTracker.Github, 32723, "Inconsistent appearance of the Title property in Picker control on Windows", PlatformAffected.UWP)] | ||
| public class Issue32723 : ContentPage | ||
| { | ||
| public Issue32723() | ||
| { | ||
| var picker = new Picker | ||
| { | ||
| Title = "Select Option", | ||
| TitleColor = Colors.Red, | ||
| CharacterSpacing = 8, | ||
| AutomationId = "issue32723Picker", | ||
| WidthRequest = 300, | ||
| HeightRequest = 48, | ||
| HorizontalOptions = LayoutOptions.Center, | ||
| ItemsSource = new List<string> { "Item 1", "Item 2", "Item 3" } | ||
| }; | ||
|
|
||
| var button = new Button | ||
| { | ||
| Text = "Change Title", | ||
| AutomationId = "issue32723Button", | ||
| HorizontalOptions = LayoutOptions.Center | ||
| }; | ||
|
|
||
| button.Clicked += (s, e) => | ||
| { | ||
| picker.Title = picker.Title == "Select Option" ? "Updated Title" : "Select Option"; | ||
| picker.TitleColor = picker.TitleColor == Colors.Red ? Colors.Blue : Colors.Red; | ||
| }; | ||
|
|
||
| Content = new VerticalStackLayout | ||
| { | ||
| Padding = new Thickness(20), | ||
| Spacing = 20, | ||
| Children = | ||
| { | ||
| new Label | ||
| { | ||
| Text = "Test passes if Picker Title displays as placeholder text inside the control.", | ||
| AutomationId = "issue32723Label", | ||
| HorizontalTextAlignment = TextAlignment.Center | ||
| }, | ||
| picker, | ||
| button | ||
| } | ||
| }; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| #if WINDOWS | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
|
||
| public class Issue32723 : _IssuesUITest | ||
| { | ||
| public Issue32723(TestDevice device) | ||
| : base(device) | ||
| { | ||
| } | ||
|
|
||
| public override string Issue => "Inconsistent appearance of the Title property in Picker control on Windows"; | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.Picker)] | ||
| public void Issue32723PickerTitleDisplaysAsPlaceholder() | ||
| { | ||
| App.WaitForElement("issue32723Picker"); | ||
| VerifyScreenshot(); | ||
|
mhrastegari marked this conversation as resolved.
Resolved
|
||
| } | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.Picker)] | ||
| public void Issue32723PickerTitleUpdatesAtRuntime() | ||
| { | ||
| App.WaitForElement("issue32723Button"); | ||
| App.Tap("issue32723Button"); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [moderate] Regression Prevention and Test Coverage — This tap mutates persistent page state and nothing restores it between tests. The host page handler toggles both properties ( Concrete failure: the two tests carry no Add |
||
| App.WaitForElement("issue32723Picker"); | ||
| VerifyScreenshot(); | ||
| } | ||
| } | ||
| #endif | ||
Uh oh!
There was an error while loading. Please reload this page.