Skip to content

Conversation

Olina-Zhang
Copy link
Member

@Olina-Zhang Olina-Zhang commented Sep 24, 2025

Related #10773

Proposed changes

  • Add unit test ToolStripKeyboardHandlingServiceTests.cs for the ToolStripKeyboardHandlingService.cs file.
Microsoft Reviewers: Open in CodeFlow

Copy link

codecov bot commented Sep 24, 2025

Codecov Report

❌ Patch coverage is 97.91667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 77.16767%. Comparing base (f812cb6) to head (2c84651).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13896         +/-   ##
===================================================
+ Coverage   77.16116%   77.16767%   +0.00651%     
===================================================
  Files           3273        3277          +4     
  Lines         644919      645164        +245     
  Branches       47694       47706         +12     
===================================================
+ Hits          497627      497858        +231     
- Misses        143607      143627         +20     
+ Partials        3685        3679          -6     
Flag Coverage Δ
Debug 77.16767% <97.91667%> (+0.00651%) ⬆️
integration 18.98627% <ø> (-0.07905%) ⬇️
production 52.04347% <ø> (-0.00230%) ⬇️
test 97.41290% <97.91667%> (+0.00033%) ⬆️
unit 49.46126% <ø> (+0.05299%) ⬆️

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.

{
TemplateNodeActive = false
};
service.OnContextMenu(10, 10).Should().BeFalse();
Copy link
Member

Choose a reason for hiding this comment

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

The actual part of the OnContextMenu method is not tested.

ricardobossan
ricardobossan previously approved these changes Sep 26, 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.

All LGTM! Please consider initializing ToolStripKeyboardHandlingService once in the constructor instead of recreating it in every test. This would also allow converting some methods into expression-bodied members. When needed, you can adjust TemplateNodeActive after the service is instantiated.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants