Skip to content
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

Add code coverage for buttons #10693

Merged

Conversation

ricardobossan
Copy link
Member

@ricardobossan ricardobossan commented Jan 18, 2024

related #10453
related #10773

Proposed changes

Add unit tests for FlatButton, RadioButton, CheckBox, RadioButtonRenderer and CheckBoxRenderer.

Customer Impact

  • None

Regression?

  • No

Risk

  • Minimal

Test methodology

  • Unit tests

Test environment(s)

  • 9.0.100-alpha.1.23618.3
Microsoft Reviewers: Open in CodeFlow

@ghost ghost assigned ricardobossan Jan 18, 2024
@ricardobossan
Copy link
Member Author

Drafted because there's more code to add coverage to.

@ghost ghost added the draft draft PR label Jan 18, 2024
Copy link

codecov bot commented Jan 22, 2024

Codecov Report

Attention: Patch coverage is 92.74194% with 27 lines in your changes are missing coverage. Please review.

Project coverage is 73.36648%. Comparing base (5c38a91) to head (656d3c9).
Report is 7 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #10693         +/-   ##
===================================================
+ Coverage   73.32489%   73.36648%   +0.04158%     
===================================================
  Files           3094        3099          +5     
  Lines         632406      632804        +398     
  Branches       46857       46880         +23     
===================================================
+ Hits          463711      464266        +555     
+ Misses        165250      165079        -171     
- Partials        3445        3459         +14     
Flag Coverage Δ
Debug 73.36648% <92.74194%> (+0.04158%) ⬆️
integration 18.29153% <ø> (-0.07114%) ⬇️
production 46.81503% <ø> (+0.04970%) ⬆️
test 94.98357% <92.74194%> (+0.00018%) ⬆️
unit 43.85612% <ø> (+0.09434%) ⬆️

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

@ricardobossan ricardobossan force-pushed the Add_Code_Coverage_For_Buttons branch 2 times, most recently from 70724a7 to 895e1cd Compare January 31, 2024 18:17
@ricardobossan ricardobossan marked this pull request as ready for review January 31, 2024 18:19
@ricardobossan ricardobossan requested a review from a team as a code owner January 31, 2024 18:19
@ghost ghost removed the draft draft PR label Jan 31, 2024
Copy link
Member

@Tanya-Solyanik Tanya-Solyanik left a comment

Choose a reason for hiding this comment

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

Great new tests! I added some comments that apply to multiple spots, but I had not repeated them everywhere, please review your changes with these comments in mind.

It will be outside of scope for this PR to move all tests to a new model where test is defined in the base class, but the Fact is implemented in a derived class. But you could implement new tests so that they follow this pattern.

Test naming is clarified here - https://github.com/dotnet/winforms/blob/main/docs/testing.md#unit-test-best-practices

@Tanya-Solyanik Tanya-Solyanik added the 📭 waiting-author-feedback The team requires more information from the author label Feb 6, 2024
@dotnet-policy-service dotnet-policy-service bot removed the 📭 waiting-author-feedback The team requires more information from the author label Feb 8, 2024
@elachlan elachlan added the 📭 waiting-author-feedback The team requires more information from the author label Feb 14, 2024
@dotnet-policy-service dotnet-policy-service bot removed the 📭 waiting-author-feedback The team requires more information from the author label Feb 15, 2024
@Tanya-Solyanik Tanya-Solyanik added the 📭 waiting-author-feedback The team requires more information from the author label Feb 17, 2024
@dotnet-policy-service dotnet-policy-service bot removed the 📭 waiting-author-feedback The team requires more information from the author label Feb 19, 2024
@Tanya-Solyanik Tanya-Solyanik added the 📭 waiting-author-feedback The team requires more information from the author label Feb 19, 2024
@dotnet-policy-service dotnet-policy-service bot removed the 📭 waiting-author-feedback The team requires more information from the author label Feb 19, 2024
@Tanya-Solyanik Tanya-Solyanik added the 📭 waiting-author-feedback The team requires more information from the author label Mar 1, 2024
@dotnet-policy-service dotnet-policy-service bot removed the 📭 waiting-author-feedback The team requires more information from the author label Mar 2, 2024
@Tanya-Solyanik Tanya-Solyanik added the 📭 waiting-author-feedback The team requires more information from the author label Mar 4, 2024
@dotnet-policy-service dotnet-policy-service bot removed the 📭 waiting-author-feedback The team requires more information from the author label Mar 5, 2024
@Tanya-Solyanik Tanya-Solyanik added the 📭 waiting-author-feedback The team requires more information from the author label Mar 6, 2024
@dotnet-policy-service dotnet-policy-service bot removed the 📭 waiting-author-feedback The team requires more information from the author label Mar 12, 2024
Tanya-Solyanik
Tanya-Solyanik previously approved these changes Mar 12, 2024
@Tanya-Solyanik
Copy link
Member

Please rebase on the latest.

@ricardobossan ricardobossan force-pushed the Add_Code_Coverage_For_Buttons branch 2 times, most recently from 3c2bb80 to 071c597 Compare March 14, 2024 14:07
@ricardobossan ricardobossan marked this pull request as draft March 14, 2024 14:09
Adds code coverage for buttons in the application,
ensuring comprehensive testing of button functionalities.

Related dotnet#10453

Squashed all commits from the PR for better clarity and management.
@ricardobossan ricardobossan marked this pull request as ready for review March 14, 2024 16:00
@Tanya-Solyanik Tanya-Solyanik added the ready-to-merge PRs that are ready to merge but worth notifying the internal team. label Mar 20, 2024
@ricardobossan ricardobossan merged commit 32bc644 into dotnet:main Mar 20, 2024
8 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0 Preview4 milestone Mar 20, 2024
@dotnet-policy-service dotnet-policy-service bot removed the ready-to-merge PRs that are ready to merge but worth notifying the internal team. label Mar 20, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants