-
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.
Resolved Text Jump Issue in Entry Control with HorizontalTextAlignmen…
…t Set to End (#24485) * fix-24405-Fixed-Entry-Text-Alignment-Issue * Fix-24405-Removed local variable and added old comment. * fix-24405-Testcase sample updated. * Fix-24405-Test case changes committed. * fix-24405-Updated new logic. * fix-24405-Test script changes committed. * fix-24405-Modified script and sample files. * fix-24405-Modified test sample code. * Fix-24405-Snapshots added for windows, iOS and Android. * Fix-24405-Updated Testscript method name.
- Loading branch information
1 parent
bc5b90b
commit 9486321
Showing
7 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
Binary file added
BIN
+16.1 KB
...droid.Tests/snapshots/android/VerifyEntryHorizontalEndTextAlignmentPosition.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions
10
src/Controls/tests/TestCases.HostApp/Issues/Issue24405.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,10 @@ | ||
<?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" | ||
xmlns:local="clr-namespace:Maui.Controls.Sample.Issues" | ||
x:Class="Maui.Controls.Sample.Issues.Issue24405"> | ||
<VerticalStackLayout> | ||
<Entry AutomationId="entry" x:Name="entry" Placeholder="Enter text here" HorizontalTextAlignment="End"/> | ||
<Button AutomationId="button" Text="Click" Clicked="OnButtonClicked"/> | ||
</VerticalStackLayout> | ||
</ContentPage> |
26 changes: 26 additions & 0 deletions
26
src/Controls/tests/TestCases.HostApp/Issues/Issue24405.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,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Linq; | ||
using Microsoft.Maui.Controls; | ||
using Microsoft.Maui.Controls.CustomAttributes; | ||
using Microsoft.Maui.Controls.Internals; | ||
|
||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Github, 24405, "Entry with right aligned text keeps text jumping to the left during editing", PlatformAffected.UWP)] | ||
public partial class Issue24405 : ContentPage | ||
{ | ||
public Issue24405() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void OnButtonClicked(object sender, EventArgs e) | ||
{ | ||
entry.Text = "Hello"; | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue24405.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,25 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue24405 : _IssuesUITest | ||
{ | ||
public Issue24405(TestDevice testDevice) : base(testDevice) | ||
{ | ||
} | ||
|
||
public override string Issue => "Entry with right aligned text keeps text jumping to the left during editing"; | ||
|
||
[Test] | ||
[Category(UITestCategories.Entry)] | ||
[FailsOnMac] | ||
public void VerifyEntryHorizontalEndTextAlignmentPosition() | ||
{ | ||
App.WaitForElement("button"); | ||
App.Tap("button"); | ||
VerifyScreenshot(); | ||
} | ||
} | ||
} |
Binary file added
BIN
+5.97 KB
...WinUI.Tests/snapshots/windows/VerifyEntryHorizontalEndTextAlignmentPosition.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.1 KB
...Cases.iOS.Tests/snapshots/ios/VerifyEntryHorizontalEndTextAlignmentPosition.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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