-
Notifications
You must be signed in to change notification settings - Fork 665
DYN-9670 - Add Mock Selection Node for UI Testing #16613
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9670
There was a problem hiding this 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 test node for model element selection in Dynamo Sandbox, following the same pattern as the Revit SelectElement node. The implementation provides a foundation for testing selection-based workflows without requiring a host application like Revit.
- Adds
TestSelectModelElementnode implementing theSelectionBasepattern - Includes supporting UI customization and localized resource strings
- Provides a mock selection helper that generates test element IDs
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
TestSelectModelElement.cs (CoreNodeModels) |
Core node implementation using SelectionBase pattern with mock selection behavior |
TestSelectModelElementNodeViewCustomization.cs |
UI customization that leverages SelectionBaseNodeViewCustomization for element selection interface |
Resources.resx |
Adds localized description and search tags for the new test node |
| public IEnumerable<string> RequestSelectionOfType(string message, SelectionType selectionType, SelectionObjectType objectType) | ||
| { | ||
| // For testing purposes, generate a mock element ID | ||
| var mockElementId = $"Element_{Guid.NewGuid().ToString("N")[..8]}"; |
Copilot
AI
Oct 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing XML documentation comment for the mockElementId variable. According to Dynamo Coding Standards, all public members and important local variables should have XML documentation comments explaining their purpose.
|
So how will this help ? |
|
Since there are no other nodes in sandbox with buttons (aside from file path), this allows us to run an AGT test to see if the node view is loading. I think that could be helpful? |
Ok, makes sense. |
|
Can all this be added under the Tests section of Dynamo solution ? In the TestUINodes project maybe ? Or those won't be visible |
|
A bunch of PR checks failing so I updated this with master |
|
@johnpierson Please take another look since these PR checks are supposed to pass before we can merge |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
@johnpierson Do you get the following error locally? |
|
is this still 4.0? |
Purpose
This PR introduces a test node for model element selection in Dynamo Sandbox, following the same pattern as the Revit SelectElement node. The implementation provides a foundation for testing selection-based workflows without requiring a host application like Revit.
Since this node is not visible in the library, here is the sample DYN (rename from txt to dyn):
Test Select Model Element.dyn.txt
Declarations
Check these if you believe they are true
Release Notes
N/A
Reviewers
@DynamoDS/synapse @DynamoDS/eidos
FYIs
@QilongTang @jnealb @avidit