-
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.
[iOS] Text alignment in editor - improvements (#24859)
* [iOS] Text alignment in editor - improvements * Update Issue24583.cs * Try old way but use content height * less noise * Added the first batch of snapshots * add more screenshots --------- Co-authored-by: tj-devel709 <tj.devel709@gmail.com>
- Loading branch information
Showing
10 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
Binary file added
BIN
+35.2 KB
.../tests/TestCases.Android.Tests/snapshots/android/TextsInEditorsAfterScaling.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
+52.2 KB
...tests/TestCases.Android.Tests/snapshots/android/TextsInEditorsBeforeScaling.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace Maui.Controls.Sample.Issues; | ||
|
||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 24583, "Text in the Editor control disappeared when reducing the Scale", PlatformAffected.iOS)] | ||
|
||
public partial class Issue24583 : ContentPage | ||
{ | ||
public Issue24583() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void Button_Clicked(object sender, EventArgs e) | ||
{ | ||
editor1.Scale = editor2.Scale = editor3.Scale = 0.5; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/Controls/tests/TestCases.HostApp/Issues/Issue24583.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,32 @@ | ||
<?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.Issue24583"> | ||
<StackLayout> | ||
<Editor x:Name="editor1" | ||
Text="1 2 3 4 5 6 7 8 9" | ||
FontSize="50" | ||
HeightRequest="200" | ||
BackgroundColor="Red" | ||
HorizontalOptions="Fill" | ||
WidthRequest="300"/> | ||
<Editor x:Name="editor2" | ||
Text="1 2 3 4 5 6 7 8 9" | ||
FontSize="50" | ||
HeightRequest="200" | ||
VerticalTextAlignment="Center" | ||
BackgroundColor="Green" | ||
HorizontalOptions="Fill" | ||
WidthRequest="300"/> | ||
<Editor x:Name="editor3" | ||
Text="1 2 3 4 5 6 7 8 9" | ||
FontSize="50" | ||
HeightRequest="200" | ||
VerticalTextAlignment="End" | ||
BackgroundColor="Blue" | ||
HorizontalOptions="Fill" | ||
WidthRequest="300"/> | ||
<Button Clicked="Button_Clicked" | ||
AutomationId="button"/> | ||
</StackLayout> | ||
</ContentPage> |
23 changes: 23 additions & 0 deletions
23
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue24583.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; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
public class Issue24583 : _IssuesUITest | ||
{ | ||
public override string Issue => "Text in the Editor control disappeared when reducing the Scale"; | ||
|
||
public Issue24583(TestDevice testDevice) : base(testDevice) | ||
{ | ||
} | ||
|
||
[Test] | ||
[Category(UITestCategories.Editor)] | ||
public void TextInEditorShouldBeCorrectlyPositionedAfterResizing() | ||
{ | ||
App.WaitForElement("button"); | ||
VerifyScreenshot("TextsInEditorsBeforeScaling"); | ||
App.Click("button"); | ||
VerifyScreenshot("TextsInEditorsAfterScaling"); | ||
} | ||
} |
Binary file added
BIN
+10.8 KB
...ls/tests/TestCases.WinUI.Tests/snapshots/windows/TextsInEditorsAfterScaling.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
+16.8 KB
...s/tests/TestCases.WinUI.Tests/snapshots/windows/TextsInEditorsBeforeScaling.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
+37.9 KB
...Controls/tests/TestCases.iOS.Tests/snapshots/ios/TextsInEditorsAfterScaling.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
+68.4 KB
...ontrols/tests/TestCases.iOS.Tests/snapshots/ios/TextsInEditorsBeforeScaling.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