Skip to content

Fix nullability errors in UI tests#4051

Merged
Keboo merged 1 commit into
masterfrom
keboo/pipeline-nullability-check
May 15, 2026
Merged

Fix nullability errors in UI tests#4051
Keboo merged 1 commit into
masterfrom
keboo/pipeline-nullability-check

Conversation

@Keboo
Copy link
Copy Markdown
Member

@Keboo Keboo commented May 15, 2026

Why

The pipeline run against master surfaced CS8629 nullability errors in UI tests where nullable Color? values were dereferenced via .Value.

What changed

This updates the affected UI tests to use the non-null value returned by await Assert.That(...).IsNotNull() before contrast checks.

  • DialogHostTests: use asserted non-null foreground values for both text blocks.
  • TabControlTests: use asserted non-null foreground/background values in contrast and underline assertions.
  • ColorAdjustTests: use asserted non-null foreground values in both contrast calculations.

Notes

This keeps test behavior the same while satisfying nullable analysis and keeping assertion style consistent across the touched tests.

Use non-null values returned from IsNotNull() assertions in UI tests to remove nullable Value dereferences while preserving test behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Keboo Keboo merged commit 2123a1a into master May 15, 2026
2 checks passed
@Keboo Keboo deleted the keboo/pipeline-nullability-check branch May 15, 2026 05:38
@Keboo Keboo added this to the 5.3.3 milestone May 15, 2026
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