Skip to content

Adds code coverage to StandardMenuStripVerb #13492

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

Conversation

ricardobossan
Copy link
Member

@ricardobossan ricardobossan commented May 21, 2025

Related #10773

Proposed changes

  • Adds code coverage to StandardMenuStripVerb

Customer Impact

  • None

Regression?

  • No

Risk

  • Minimal

Test methodology

  • Unit tests

Test environment(s)

  • 10.0.100-preview.5.25265.106
Microsoft Reviewers: Open in CodeFlow

Related dotnet#10773

## Proposed changes

- Adds code coverage to `StandardMenuStripVerb`

## Customer Impact

- None

## Regression?

- No

## Risk

- Minimal

## Test methodology

- Unit tests

## Test environment(s)

- 10.0.100-preview.5.25265.106
@ricardobossan ricardobossan self-assigned this May 21, 2025
@ricardobossan ricardobossan requested a review from a team as a code owner May 21, 2025 00:06
@ricardobossan ricardobossan added the waiting-review This item is waiting on review by one or more members of team label May 21, 2025
@LeafShi1 LeafShi1 requested a review from Copilot May 21, 2025 06:16
Copy link
Contributor

@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 to improve code coverage of StandardMenuStripVerb, verifying its constructor and item insertion behavior.

  • Introduces StandardMenuStripVerbTests with extensive Moq setup for designer host and services.
  • Adds tests for the class constructor and the InsertItems method.
Comments suppressed due to low confidence (1)

src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/StandardMenuStripVerbTests.cs:108

  • [nitpick] Currently only the constructor and InsertItems are verified. Consider adding tests for other behaviors (e.g., error paths, multiple inserts) to fully cover StandardMenuStripVerb.
[WinFormsFact]

Copy link

codecov bot commented May 21, 2025

Codecov Report

❌ Patch coverage is 96.11650% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.90004%. Comparing base (4c32f29) to head (20ee51d).
⚠️ Report is 188 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13492         +/-   ##
===================================================
+ Coverage   76.59683%   76.90004%   +0.30321%     
===================================================
  Files           3230        3263         +33     
  Lines         639157      643711       +4554     
  Branches       47295       47638        +343     
===================================================
+ Hits          489574      495014       +5440     
+ Misses        146007      145024        -983     
- Partials        3576        3673         +97     
Flag Coverage Δ
Debug 76.90004% <96.11650%> (+0.30321%) ⬆️
integration 18.99237% <0.00000%> (+0.20229%) ⬆️
production 51.56760% <100.00000%> (+0.56654%) ⬆️
test 97.42117% <96.03960%> (+0.01706%) ⬆️
unit 48.97287% <100.00000%> (+0.57441%) ⬆️

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.

Co-authored-by: Klaus Löffelmann <9663150+KlausLoeffelmann@users.noreply.github.com>
@LeafShi1 LeafShi1 self-requested a review July 4, 2025 05:46
@ricardobossan ricardobossan requested a review from LeafShi1 July 11, 2025 23:17
LeafShi1
LeafShi1 previously approved these changes Jul 18, 2025
@LeafShi1 LeafShi1 merged commit 7c9d043 into dotnet:main Aug 4, 2025
8 checks passed
@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 Aug 4, 2025
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.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy