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 StandardCommandToolStripMenuItem #13215

Conversation

Zheng-Li01
Copy link
Member

@Zheng-Li01 Zheng-Li01 commented Apr 1, 2025

Related #10773

Proposed changes

Add unit test file: StandardCommandToolStripMenuItemTests.cs for public methods of the StandardCommandToolStripMenuItem.cs

Microsoft Reviewers: Open in CodeFlow

Copy link

codecov bot commented Apr 1, 2025

Codecov Report

Attention: Patch coverage is 98.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 61.82138%. Comparing base (87d8d54) to head (4989823).
Report is 58 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13215         +/-   ##
===================================================
+ Coverage   61.35135%   61.82138%   +0.47003%     
===================================================
  Files           1547        1553          +6     
  Lines         158479      159000        +521     
  Branches       14751       14806         +55     
===================================================
+ Hits           97229       98296       +1067     
+ Misses         60548       59989        -559     
- Partials         702         715         +13     
Flag Coverage Δ
Debug 61.82138% <98.00000%> (+0.47003%) ⬆️
integration 10.72623% <ø> (-0.00563%) ⬇️
production 39.84358% <ø> (+0.62380%) ⬆️
test 95.67204% <98.00000%> (-0.00743%) ⬇️
unit 37.28464% <ø> (+0.63240%) ⬆️

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 waiting-review This item is waiting on review by one or more members of team and removed area-Infrastructure labels Apr 1, 2025
@ricardobossan ricardobossan requested a review from Copilot April 2, 2025 23:50
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

This PR introduces unit tests for StandardCommandToolStripMenuItem to improve code coverage by validating its public methods.

  • Adds tests verifying property initialization through the constructor
  • Includes tests for updating item properties via RefreshItem
  • Checks that the Image property caches its value after the first access

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 a small comment, all LGTM!

@Tanya-Solyanik Tanya-Solyanik added waiting-author-feedback The team requires more information from the author area: test coverage and removed waiting-review This item is waiting on review by one or more members of team labels Apr 3, 2025
@Zheng-Li01 Zheng-Li01 added waiting-review This item is waiting on review by one or more members of team and removed waiting-author-feedback The team requires more information from the author labels Apr 7, 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!

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.

Thank you!

@Tanya-Solyanik Tanya-Solyanik merged commit 4722624 into dotnet:main Apr 8, 2025
8 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0 Preview4 milestone Apr 8, 2025
@dotnet-policy-service dotnet-policy-service bot removed the waiting-review This item is waiting on review by one or more members of team label Apr 8, 2025
@Zheng-Li01 Zheng-Li01 deleted the Add_code_coverage_for_StandardCommandToolStripMenuItemTests branch April 9, 2025 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants