Cover GUI helpers that work on live WPF controls - #83
Merged
Merged
Conversation
Third GUI test slice, and the pattern for the rest. ConvertTo-NormalizedCheckboxState, Set-TriStatePresetCheckBoxState, and Test-ComboBoxContainsMatch take real CheckBox and ComboBox objects, so each scenario builds the control, calls the function, and checks the resulting state. WPF construction needs an STA thread and the unit job runs under pwsh (MTA), so every scenario runs in its own STA runspace, which also loads the WPF assemblies away from the test host. Verified under both STA and MTA parents. Covers the subtle cases: a checkbox that was indeterminate before its click is normalized to checked, and the tri-state preset box goes unchecked / checked / indeterminate for none / all / partial selections. Wired into test.yml.
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.
Third GUI test slice (Epic Q), and the pattern for the remaining control-bound helpers.
ConvertTo-NormalizedCheckboxState,Set-TriStatePresetCheckBoxState, andTest-ComboBoxContainsMatchtake realCheckBox/ComboBoxobjects, so each scenario builds the control, calls the function, and asserts the resulting state.WPF construction needs STA and the unit job runs under
pwsh(MTA), so every scenario runs in its own STA runspace (same in-process AppDomain, so returned values are real, not serialized). Verified under both STA and MTA parents.Locks down the subtle behavior:
ComboBoxItemand a plain string item.Wired into
test.yml. Test-only; no product change, no release. Local: static validation clean (138 files), fullTests\Unit252 passed / 0 failed (7 new).