-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release/9.0.1xx-sr1] Remove code that enables/disables Entry (#26107)
- Loading branch information
1 parent
84abe93
commit 4b7be58
Showing
4 changed files
with
124 additions
and
12 deletions.
There are no files selected for viewing
70 changes: 70 additions & 0 deletions
70
src/Controls/tests/TestCases.HostApp/Issues/Issue25829.xaml
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,70 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Maui.Controls.Sample.Issues.Issue25829" | ||
xmlns:ns="clr-namespace:Maui.Controls.Sample.Issues"> | ||
<ScrollView> | ||
<VerticalStackLayout | ||
Padding="30,0" | ||
Spacing="25"> | ||
|
||
<Button x:Name="testButton" | ||
Text="This Button Should be Visible" Clicked="OnButtonClicked" | ||
SemanticProperties.HeadingLevel="Level1" /> | ||
|
||
<Image | ||
Source="dotnet_bot.png" | ||
HeightRequest="185" | ||
Aspect="AspectFit" | ||
SemanticProperties.Description="dot net bot in a hovercraft number nine" /> | ||
|
||
|
||
<Button | ||
Text="Click me" | ||
SemanticProperties.Hint="Counts the number of times you click" | ||
|
||
HorizontalOptions="Fill" /> | ||
<Button | ||
Text="Click me" | ||
SemanticProperties.Hint="Counts the number of times you click" | ||
|
||
HorizontalOptions="Fill" /> | ||
<Button | ||
Text="Click me" | ||
SemanticProperties.Hint="Counts the number of times you click" | ||
|
||
HorizontalOptions="Fill" /> | ||
<Button | ||
Text="Click me" | ||
SemanticProperties.Hint="Counts the number of times you click" | ||
HorizontalOptions="Fill" /> | ||
<Button | ||
Text="Click me" | ||
SemanticProperties.Hint="Counts the number of times you click" | ||
HorizontalOptions="Fill" /> | ||
<Button | ||
Text="Click me" | ||
SemanticProperties.Hint="Counts the number of times you click" | ||
HorizontalOptions="Fill" /> | ||
<Button | ||
Text="Click me" | ||
SemanticProperties.Hint="Counts the number of times you click" | ||
HorizontalOptions="Fill" /> | ||
<Button | ||
Text="Click me" | ||
SemanticProperties.Hint="Counts the number of times you click" | ||
HorizontalOptions="Fill" /> | ||
<Button | ||
Text="Click me" | ||
SemanticProperties.Hint="Counts the number of times you click" | ||
HorizontalOptions="Fill" /> | ||
|
||
<Entry Text=""></Entry> | ||
<Entry Text="Entry Field"></Entry> | ||
<Entry Text="Entry Field"></Entry> | ||
<Entry Text="Entry Field"></Entry> | ||
<Entry Text="Entry Field"></Entry> | ||
<Entry Text="Entry Field"></Entry> | ||
</VerticalStackLayout> | ||
</ScrollView> | ||
</ContentPage> |
31 changes: 31 additions & 0 deletions
31
src/Controls/tests/TestCases.HostApp/Issues/Issue25829.xaml.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,31 @@ | ||
namespace Maui.Controls.Sample.Issues; | ||
|
||
|
||
[Issue(IssueTracker.Github, 25829, "ScrollView starts at the position of first Entry control on the bottom rather than at 0", | ||
PlatformAffected.Android)] | ||
public partial class Issue25829 : ContentPage | ||
{ | ||
public Issue25829() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
protected override void OnAppearing() | ||
{ | ||
base.OnAppearing(); | ||
|
||
if(this.Navigation.ModalStack.Contains(this)) | ||
{ | ||
testButton.AutomationId = "Success"; | ||
} | ||
else | ||
{ | ||
testButton.AutomationId = "PushModal"; | ||
} | ||
} | ||
|
||
public async void OnButtonClicked(object sender, EventArgs e) | ||
{ | ||
await Navigation.PushModalAsync(new Issue25829()); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25829.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,23 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
using System.Threading.Tasks; | ||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue25829 : _IssuesUITest | ||
{ | ||
public Issue25829(TestDevice device) : base(device) { } | ||
|
||
public override string Issue => "ScrollView starts at the position of first Entry control on the bottom rather than at 0"; | ||
|
||
[Test] | ||
[Category(UITestCategories.Entry)] | ||
public void ScrollViewStartsOccasionallyStartsAtTheFirstEntry() | ||
{ | ||
App.WaitForElement("PushModal"); | ||
App.Tap("PushModal"); | ||
App.WaitForElement("Success"); | ||
App.Tap("Success"); | ||
} | ||
} | ||
} |
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