-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Windows] Fix Span Foreground property (#24063)
* 23448 - Span text-decoration is incorrect whereas the Label behaves properly. * added UITest - 23488 * AutomationId added. * updated namespace properly. * Output images added.
- Loading branch information
1 parent
937f410
commit 52386b8
Showing
7 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
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
Binary file added
BIN
+8.87 KB
...ests/TestCases.Android.Tests/snapshots/android/LabelHyperlinkUnderlineColor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions
22
src/Controls/tests/TestCases.HostApp/Issues/Issue23488.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,22 @@ | ||
<?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.Issue23488"> | ||
|
||
<StackLayout HorizontalOptions="Center" | ||
VerticalOptions="Center"> | ||
<Label Text="hyperlink" | ||
TextColor="Blue" | ||
TextDecorations="Underline" /> | ||
<Label AutomationId="WaitForLabelControl"> | ||
<Label.FormattedText> | ||
<FormattedString> | ||
<Span Text="hyperlink" | ||
TextColor="Blue" | ||
TextDecorations="Underline" /> | ||
</FormattedString> | ||
</Label.FormattedText> | ||
</Label> | ||
</StackLayout> | ||
|
||
</ContentPage> |
12 changes: 12 additions & 0 deletions
12
src/Controls/tests/TestCases.HostApp/Issues/Issue23488.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,12 @@ | ||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 23488, "Span text-decoration is incorrect whereas the Label behaves properly", PlatformAffected.UWP)] | ||
public partial class Issue23488 : ContentPage | ||
{ | ||
public Issue23488() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue23488.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 @@ | ||
#if !MACCATALYST | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue23488 : _IssuesUITest | ||
{ | ||
public Issue23488(TestDevice device): base(device) | ||
{ | ||
} | ||
|
||
public override string Issue => "Span text-decoration is incorrect whereas the Label behaves properly"; | ||
|
||
[Test] | ||
[Category(UITestCategories.Label)] | ||
public void LabelHyperlinkUnderlineColor() | ||
{ | ||
App.WaitForElement("WaitForLabelControl"); | ||
VerifyScreenshot(); | ||
} | ||
} | ||
} | ||
#endif |
Binary file added
BIN
+3.49 KB
.../tests/TestCases.WinUI.Tests/snapshots/windows/LabelHyperlinkUnderlineColor.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
+19.5 KB
...ntrols/tests/TestCases.iOS.Tests/snapshots/ios/LabelHyperlinkUnderlineColor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.