-
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.
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/Controls/samples/Controls.Sample.UITests/Issues/Issue18832.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,12 @@ | ||
<?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.Issue18832" | ||
xmlns:ns="clr-namespace:Maui.Controls.Sample.Issues"> | ||
<VerticalStackLayout> | ||
<Label Text="Button: "/> | ||
<Button AutomationId="button" Text="Hello, World!" CharacterSpacing="10" FontSize="30"/> | ||
<Label Text="Label: "/> | ||
<Label AutomationId="label" Text="Hello, World!" CharacterSpacing="10" FontSize="30"/> | ||
</VerticalStackLayout> | ||
</ContentPage> |
15 changes: 15 additions & 0 deletions
15
src/Controls/samples/Controls.Sample.UITests/Issues/Issue18832.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,15 @@ | ||
using Microsoft.Maui.Controls; | ||
using Microsoft.Maui.Controls.Xaml; | ||
|
||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 18832, "[iOS] Button CharacterSpacing makes FontSize fixed and large", PlatformAffected.iOS)] | ||
public partial class Issue18832 : ContentPage | ||
{ | ||
public Issue18832() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
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,27 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.AppiumTests.Issues | ||
{ | ||
public class Issue18832 : _IssuesUITest | ||
{ | ||
public override string Issue => "[iOS] Button CharacterSpacing makes FontSize fixed and large"; | ||
|
||
public Issue18832(TestDevice device) : base(device) | ||
{ | ||
} | ||
|
||
[Test] | ||
public void SizesOfBothTextsShouldHaveTheSameAndCharacterSpacing() | ||
{ | ||
this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.Android, TestDevice.Mac, TestDevice.Windows }); | ||
|
||
_ = App.WaitForElement("button"); | ||
|
||
// The test passes if both "Hello, World!" texts are of the same size | ||
// and have the same character spacing | ||
VerifyScreenshot(); | ||
} | ||
} | ||
} |