Skip to content

Add test for design binding picker #13536

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

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

Conversation

LeafShi1
Copy link
Member

@LeafShi1 LeafShi1 commented May 29, 2025

Related #10773

Microsoft Reviewers: Open in CodeFlow

@LeafShi1 LeafShi1 force-pushed the Add_test_for_DesignBindingPicker branch from b46fb99 to 8f4c5b8 Compare May 29, 2025 07:54
Copy link

codecov bot commented May 29, 2025

Codecov Report

Attention: Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.59848%. Comparing base (4c32f29) to head (48bcc26).
Report is 15 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13536         +/-   ##
===================================================
+ Coverage   76.59683%   76.59848%   +0.00164%     
===================================================
  Files           3230        3231          +1     
  Lines         639157      639185         +28     
  Branches       47295       47302          +7     
===================================================
+ Hits          489574      489606         +32     
+ Misses        146007      145995         -12     
- Partials        3576        3584          +8     
Flag Coverage Δ
Debug 76.59848% <94.44444%> (+0.00164%) ⬆️
integration 18.79446% <ø> (+0.00438%) ⬆️
production 51.00177% <ø> (+0.00072%) ⬆️
test 97.40381% <94.44444%> (-0.00031%) ⬇️
unit 48.40121% <ø> (+0.00274%) ⬆️

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.

Pull Request Overview

This PR introduces a new unit test class to verify that the DesignBindingPicker control and its subcomponents are initialized correctly.

  • Adds DesignBindingPickerTests covering constructor setup, panel child controls, and a helper for control-type checks.
  • Introduces a private helper method ContainsType<T> to simplify asserting presence of child controls by type.

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.

Please consider adding, in this or another PR, tests for the remaining public and protected methods: Pick, OnVisibleChanged, OnGotFocus and RescaleConstantsForDpi.

@ricardobossan ricardobossan added the waiting-author-feedback The team requires more information from the author label May 29, 2025
@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback The team requires more information from the author label May 30, 2025
@LeafShi1 LeafShi1 added the waiting-review This item is waiting on review by one or more members of team label May 30, 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
area-test coverage 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.

2 participants