Skip to content

Add code coverage for CheckBox #13455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Zheng-Li01
Copy link
Member

@Zheng-Li01 Zheng-Li01 commented May 14, 2025

Related #13442

Proposed changes

Add unit test file: CheckBoxTests.cs for Internal methods of the CheckBox.cs

Microsoft Reviewers: Open in CodeFlow

Copy link

codecov bot commented May 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.60706%. Comparing base (5821493) to head (f1b0038).
Report is 2 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                  @@
##                main      #13455          +/-   ##
====================================================
+ Coverage   62.21083%   76.60706%   +14.39623%     
====================================================
  Files           3213        3230          +17     
  Lines         638302      639133         +831     
  Branches       47201       47291          +90     
====================================================
+ Hits          397093      489621       +92528     
+ Misses        234153      145937       -88216     
+ Partials        7056        3575        -3481     
Flag Coverage Δ
Debug 76.60706% <100.00000%> (+14.39623%) ⬆️
integration 18.78248% <ø> (-0.00630%) ⬇️
production 51.01557% <ø> (+32.22678%) ⬆️
test 97.40437% <100.00000%> (+0.00025%) ⬆️
unit 48.39813% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Zheng-Li01 Zheng-Li01 added the waiting-review This item is waiting on review by one or more members of team label May 14, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds unit tests for internal CheckBox methods to improve code coverage, focusing on preferred size calculations under different styles and minimum height enforcement.

  • Introduces a parameterized Theory covering various Appearance and FlatStyle combinations in GetPreferredSizeCore.
  • Adds a Fact to ensure a minimum height is enforced by GetPreferredSizeCore.

Copy link
Member

@ricardobossan ricardobossan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than colleague's comments, all LGTM!

@ricardobossan ricardobossan added the waiting-author-feedback The team requires more information from the author label May 14, 2025
@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback The team requires more information from the author label May 15, 2025
Copy link
Member

@ricardobossan ricardobossan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-test coverage waiting-review This item is waiting on review by one or more members of team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants