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 unit tests for ToolStripAdornerWindowService #13029

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

Conversation

Nora-Zhou01
Copy link
Member

@Nora-Zhou01 Nora-Zhou01 commented Feb 26, 2025

Related #10773

Proposed changes

  • Add unit test ToolStripAdornerWindowServiceTests.cs for public properties and method of the ToolStripAdornerWindowService
Microsoft Reviewers: Open in CodeFlow

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 90.65421% with 10 lines in your changes missing coverage. Please review.

Project coverage is 61.32004%. Comparing base (e91e3bc) to head (36a5dd1).
Report is 369 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                  @@
##                main      #13029          +/-   ##
====================================================
- Coverage   75.75455%   61.32004%   -14.43451%     
====================================================
  Files           3159        1525        -1634     
  Lines         635942      158025      -477917     
  Branches       46987       14712       -32275     
====================================================
- Hits          481755       96901      -384854     
+ Misses        150726       60434       -90292     
+ Partials        3461         690        -2771     
Flag Coverage Δ
Debug 61.32004% <90.65421%> (-14.43451%) ⬇️
integration 10.64420% <ø> (-7.53058%) ⬇️
production 39.09191% <ø> (-10.22564%) ⬇️
test 95.66737% <90.65421%> (-1.37770%) ⬇️
unit 36.50795% <ø> (-10.02375%) ⬇️

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.

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.

PR Overview

This pull request adds unit tests for the ToolStripAdornerWindowService to validate its public properties and methods along with enabling nullability in the tests.

  • Introduces multiple tests covering graphics, coordinate translation, and resource disposal.
  • Provides STA-thread execution for tests that interact with UI components.

Reviewed Changes

File Description
src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/ToolStripAdornerWindowServiceTests.cs Contains new unit tests for verifying ToolStripAdornerWindowService behavior and proper handling of designer overlays and graphics.

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

@ricardobossan ricardobossan added the waiting-author-feedback The team requires more information from the author label Mar 3, 2025
@Nora-Zhou01 Nora-Zhou01 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 Mar 5, 2025
ricardobossan
ricardobossan previously approved these changes Mar 6, 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!

@Tanya-Solyanik Tanya-Solyanik added 📭 waiting-author-feedback and removed waiting-review This item is waiting on review by one or more members of team labels Mar 7, 2025
@ricardobossan ricardobossan dismissed their stale review March 7, 2025 02:14

New comments need to be addressed

@Nora-Zhou01 Nora-Zhou01 added the waiting-review This item is waiting on review by one or more members of team label Mar 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants