[Testing] Fix Label CharacterSpacing/LineHeight/TextDecorations test for HTML labels#34934
Merged
kubaflo merged 1 commit intodotnet:inflight/currentfrom Apr 13, 2026
Conversation
…abels PR dotnet#31202 changed the Label mapper to use HasFormattedTextSpans instead of IsPlainText, which correctly allows CharacterSpacing, LineHeight, and TextDecorations to be applied to HTML labels. The test expectations for label4 (TextType.Html) were not updated to match this new behavior. Update expected values from (0, 0, None) to (5, 1.5, Underline). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
/azp run maui-pr-devicetests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
kubaflo
added a commit
that referenced
this pull request
Apr 14, 2026
…for HTML labels (#34934) (#34951) ### Description of Change Ports the test fix from PR #34934 (inflight/current) to inflight/candidate. PR #31202 changed the Label mapper conditions from `!IsPlainText(label)` to `label.HasFormattedTextSpans` for `MapLineHeight`, `MapTextDecorations`, and `MapCharacterSpacing`. This correctly enables these properties to be applied to HTML labels. However, the test expectations for `label4` (an HTML label with `CharacterSpacing=5`, `LineHeight=1.5`, `TextDecorations=Underline`) were not updated. **Fix:** Update expected values for label4 from `(0, 0, None)` to `(5, 1.5, Underline)`. ### Issues Fixed Fixes CharacterSpacingWithLineHeightWithTextDecorationsWorksCorrectly device test regression from #31202 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen
pushed a commit
that referenced
this pull request
Apr 14, 2026
…for HTML labels (#34934) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Fixes the `CharacterSpacingWithLineHeightWithTextDecorationsWorksCorrectly` device test regression introduced by PR #31202. PR #31202 changed the Label mapper conditions from `!IsPlainText(label)` to `label.HasFormattedTextSpans` for `MapLineHeight`, `MapTextDecorations`, and `MapCharacterSpacing`. This correctly enables these properties to be applied to HTML labels (`TextType.Html`), since `HasFormattedTextSpans` only returns true for `FormattedText` with spans — not for HTML. However, the test expectations for `label4` (an HTML label with `CharacterSpacing=5`, `LineHeight=1.5`, `TextDecorations=Underline`) were not updated and still expected `(0, 0, None)`. **Fix:** Update expected values for label4 from `(0, 0, None)` to `(5, 1.5, Underline)` to match the new behavior. ### Issues Fixed Fixes CharacterSpacingWithLineHeightWithTextDecorationsWorksCorrectly device test regression from #31202 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
devanathan-vaithiyanathan
pushed a commit
to Tamilarasan-Paranthaman/maui
that referenced
this pull request
Apr 21, 2026
…for HTML labels (dotnet#34934) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Fixes the `CharacterSpacingWithLineHeightWithTextDecorationsWorksCorrectly` device test regression introduced by PR dotnet#31202. PR dotnet#31202 changed the Label mapper conditions from `!IsPlainText(label)` to `label.HasFormattedTextSpans` for `MapLineHeight`, `MapTextDecorations`, and `MapCharacterSpacing`. This correctly enables these properties to be applied to HTML labels (`TextType.Html`), since `HasFormattedTextSpans` only returns true for `FormattedText` with spans — not for HTML. However, the test expectations for `label4` (an HTML label with `CharacterSpacing=5`, `LineHeight=1.5`, `TextDecorations=Underline`) were not updated and still expected `(0, 0, None)`. **Fix:** Update expected values for label4 from `(0, 0, None)` to `(5, 1.5, Underline)` to match the new behavior. ### Issues Fixed Fixes CharacterSpacingWithLineHeightWithTextDecorationsWorksCorrectly device test regression from dotnet#31202 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ahamed-Ali
pushed a commit
that referenced
this pull request
Apr 22, 2026
…for HTML labels (#34934) (#34951) ### Description of Change Ports the test fix from PR #34934 (inflight/current) to inflight/candidate. PR #31202 changed the Label mapper conditions from `!IsPlainText(label)` to `label.HasFormattedTextSpans` for `MapLineHeight`, `MapTextDecorations`, and `MapCharacterSpacing`. This correctly enables these properties to be applied to HTML labels. However, the test expectations for `label4` (an HTML label with `CharacterSpacing=5`, `LineHeight=1.5`, `TextDecorations=Underline`) were not updated. **Fix:** Update expected values for label4 from `(0, 0, None)` to `(5, 1.5, Underline)`. ### Issues Fixed Fixes CharacterSpacingWithLineHeightWithTextDecorationsWorksCorrectly device test regression from #31202 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen
pushed a commit
that referenced
this pull request
Apr 22, 2026
…for HTML labels (#34934) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Fixes the `CharacterSpacingWithLineHeightWithTextDecorationsWorksCorrectly` device test regression introduced by PR #31202. PR #31202 changed the Label mapper conditions from `!IsPlainText(label)` to `label.HasFormattedTextSpans` for `MapLineHeight`, `MapTextDecorations`, and `MapCharacterSpacing`. This correctly enables these properties to be applied to HTML labels (`TextType.Html`), since `HasFormattedTextSpans` only returns true for `FormattedText` with spans — not for HTML. However, the test expectations for `label4` (an HTML label with `CharacterSpacing=5`, `LineHeight=1.5`, `TextDecorations=Underline`) were not updated and still expected `(0, 0, None)`. **Fix:** Update expected values for label4 from `(0, 0, None)` to `(5, 1.5, Underline)` to match the new behavior. ### Issues Fixed Fixes CharacterSpacingWithLineHeightWithTextDecorationsWorksCorrectly device test regression from #31202 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Draft
PureWeen
pushed a commit
that referenced
this pull request
Apr 28, 2026
…for HTML labels (#34934) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Fixes the `CharacterSpacingWithLineHeightWithTextDecorationsWorksCorrectly` device test regression introduced by PR #31202. PR #31202 changed the Label mapper conditions from `!IsPlainText(label)` to `label.HasFormattedTextSpans` for `MapLineHeight`, `MapTextDecorations`, and `MapCharacterSpacing`. This correctly enables these properties to be applied to HTML labels (`TextType.Html`), since `HasFormattedTextSpans` only returns true for `FormattedText` with spans — not for HTML. However, the test expectations for `label4` (an HTML label with `CharacterSpacing=5`, `LineHeight=1.5`, `TextDecorations=Underline`) were not updated and still expected `(0, 0, None)`. **Fix:** Update expected values for label4 from `(0, 0, None)` to `(5, 1.5, Underline)` to match the new behavior. ### Issues Fixed Fixes CharacterSpacingWithLineHeightWithTextDecorationsWorksCorrectly device test regression from #31202 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
Fixes the
CharacterSpacingWithLineHeightWithTextDecorationsWorksCorrectlydevice test regression introduced by PR #31202.PR #31202 changed the Label mapper conditions from
!IsPlainText(label)tolabel.HasFormattedTextSpansforMapLineHeight,MapTextDecorations, andMapCharacterSpacing. This correctly enables these properties to be applied to HTML labels (TextType.Html), sinceHasFormattedTextSpansonly returns true forFormattedTextwith spans — not for HTML.However, the test expectations for
label4(an HTML label withCharacterSpacing=5,LineHeight=1.5,TextDecorations=Underline) were not updated and still expected(0, 0, None).Fix: Update expected values for label4 from
(0, 0, None)to(5, 1.5, Underline)to match the new behavior.Issues Fixed
Fixes CharacterSpacingWithLineHeightWithTextDecorationsWorksCorrectly device test regression from #31202