Skip to content

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

Merged
kubaflo merged 1 commit intodotnet:inflight/currentfrom
kubaflo:fix/label-characterspacing-test
Apr 13, 2026
Merged

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

Conversation

@kubaflo
Copy link
Copy Markdown
Contributor

@kubaflo kubaflo commented Apr 13, 2026

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 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

…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
Copy link
Copy Markdown
Contributor Author

kubaflo commented Apr 13, 2026

/azp run maui-pr-devicetests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@kubaflo kubaflo merged commit a7b198c into dotnet:inflight/current Apr 13, 2026
12 of 25 checks passed
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>
@github-actions github-actions Bot mentioned this pull request Apr 25, 2026
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>
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