Adds tests to ExpandAllGridItems and CollapseAllGridItems#14601
Closed
ricardobossan wants to merge 2 commits into
Closed
Adds tests to ExpandAllGridItems and CollapseAllGridItems#14601ricardobossan wants to merge 2 commits into
ricardobossan wants to merge 2 commits into
Conversation
- Not a bug. `PropertyGrid.ExpandAllGridItems` and `PropertyGrid.CollapseAllGridItems` had no unit test coverage, contributing to the PropertyGrid's overall coverage gap (~49.91%). - Add two unit tests to `PropertyGridTests.cs`: - `PropertyGrid_ExpandAllGridItems_ExpandsNestedGridItems` - `PropertyGrid_CollapseAllGridItems_CollapsesNestedGridItems` - Both reuse the existing `MyClass` fixture (it already exposes an `[ExpandableObjectConverter]` nested property), set it as `SelectedObject`, then assert the nested entry's `Expanded` state flips as expected. - Add a small `FindExpandableProperty` test helper that walks to the root grid item and returns the first expandable property entry. - None - No - Minimal - Unit tests - 11.0.100-preview.5.26227.104
91 tasks
Member
|
Please fix the failed test cases first. |
LeafShi1
reviewed
Jun 4, 2026
27f3d38 to
6b826ca
Compare
SimonZhao888
approved these changes
Jun 11, 2026
LeafShi1
approved these changes
Jun 11, 2026
Member
Author
|
Closing due to #12055 (comment) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #12055
Root Cause
PropertyGrid.ExpandAllGridItemsandPropertyGrid.CollapseAllGridItemshad no unit test coverage, contributing to the PropertyGrid's overall coverage gap (~49.91%).Proposed changes
PropertyGridTests.cs:PropertyGrid_ExpandAllGridItems_ExpandsNestedGridItemsPropertyGrid_CollapseAllGridItems_CollapsesNestedGridItemsMyClassfixture (it already exposes an[ExpandableObjectConverter]nested property), set it asSelectedObject, then assert the nested entry'sExpandedstate flips as expected.FindExpandablePropertytest helper that walks to the root grid item and returns the first expandable property entry.Customer Impact
Regression?
Risk
Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow