Repository navigation
fix: add regression tests for #515 and #665 - #879
Conversation
- Add regression tests for HasErrors timing in property change callbacks (#515) - Add MinValue/MaxValue properties to IndeiTestViewModel for cross-field validation testing
There was a problem hiding this comment.
Pull request overview
Adds regression coverage to ensure previously fixed issues (#515 HasErrors timing in reactive side-effects, #665 ObjectDisposedException on disposal/clearing with active subscriptions/bindings) remain non-reproducible within the ReactiveUI.Validation test suite.
Changes:
- Added 5 regression tests around disposal safety and
HasErrorscorrectness in reactive callbacks. - Extended
IndeiTestViewModelwithMinValue/MaxValueto support cross-field validation regression testing.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/tests/ReactiveUI.Validation.Tests/NotifyDataErrorInfoTests.cs | Adds new regression tests for #515 and #665 scenarios (disposal, clearing rules with active subscriptions, HasErrors correctness in reactive callbacks). |
| src/tests/ReactiveUI.Validation.Tests/Models/IndeiTestViewModel.cs | Adds MinValue/MaxValue properties to support cross-field validation regression tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Assert full HasErrors sequence instead of just last value - Fix XML doc to reference WhenAnyValue instead of WhenAnyPropertyChanged
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #879 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 675 675
Branches 113 113
=========================================
Hits 675 675 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Fixes #515
Fixes #665
Both issues have been confirmed as no longer reproducible on the current codebase. This PR adds regression tests to ensure they stay fixed.
#665 - ObjectDisposedException thrown
ValidationHelperwith active bindings does not throwViewModelwith activeErrorsChangedsubscriptions does not throwIsValid()is subscribed does not throw#515 - HasErrors incorrect when performing a side effect from WhenAnyPropertyChanged
HasErrorsreflects correct state inside aWhenAnyValuecallback after property changesHasErrorsreflects correct state for cross-field validation (MinValue/MaxValue) inside a property change side effectTest plan