Skip to content

[Testing] Fix Label CharacterSpacing/LineHeight/TextDecorations test for HTML labels (#34934)#34951

Merged
kubaflo merged 1 commit intodotnet:inflight/candidatefrom
kubaflo:fix/label-characterspacing-test-candidate
Apr 14, 2026
Merged

[Testing] Fix Label CharacterSpacing/LineHeight/TextDecorations test for HTML labels (#34934)#34951
kubaflo merged 1 commit intodotnet:inflight/candidatefrom
kubaflo:fix/label-characterspacing-test-candidate

Conversation

@kubaflo
Copy link
Copy Markdown
Contributor

@kubaflo kubaflo commented Apr 14, 2026

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

…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>
@kubaflo kubaflo merged commit 715d5f9 into dotnet:inflight/candidate Apr 14, 2026
6 of 16 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant