[Testing] Fix Label CharacterSpacing/LineHeight/TextDecorations test for HTML labels (#34934)#34951
Merged
kubaflo merged 1 commit intodotnet:inflight/candidatefrom Apr 14, 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>
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>
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.
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)tolabel.HasFormattedTextSpansforMapLineHeight,MapTextDecorations, andMapCharacterSpacing. This correctly enables these properties to be applied to HTML labels.However, the test expectations for
label4(an HTML label withCharacterSpacing=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