-
-
Notifications
You must be signed in to change notification settings - Fork 1
Add comprehensive unit tests for Uno controls and internals #311
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
ChrisPulman
wants to merge
15
commits into
main
Choose a base branch
from
UpdateRxUI
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Deleted the ReactiveUI.Uno.SQLiteStudio sample project and related files, including test projects and configuration files. Updated .editorconfig to improve organization, add comments, and clarify analyzer rules. Added new documentation and configuration files (CLAUDE.md, agent.md, codecov.yml, etc.), and updated solution and project references accordingly.
Replaces the .sln solution file with a new .slnx format and updates references accordingly. Enhances WinRTAppDataDriver to implement JSON-based state load/save/invalidate methods and improves error handling. Updates Directory.Build.props to include net9.0 in cross-platform targets and suppresses additional warnings. Adds comprehensive unit tests for activation, bootstrapping, builder extensions, controls, converters, helpers, hooks, observables, platform operations, registrations, resources, schedulers, and storage. Updates example project to suppress more warnings and disables TreatWarningsAsErrors. Simplifies and redirects Copilot instructions to agent.md.
Introduces a new example project, ReactiveUI.Uno.SQLiteStudio, demonstrating usage of ReactiveUI with Uno Platform and SQLite. Refactors UnoReactiveUIBuilderExtensions to require the startup window for WithUno, updates scheduler registration, and improves Uno dictionary resource injection. Updates codecov config to ignore examples, adjusts target framework order for Uno cross-platform builds, and includes the new example in the solution.
Changed CI and release workflows to reference the .slnx solution file instead of .sln. Updated ReactiveUI.Uno.slnx to include workflow files and set deploy configuration for the SQLiteStudio example project. Fixed test to pass required parameters to WithUno.
Enhanced XML documentation for several classes and dependency properties to provide clearer descriptions and usage context. Removed unused or unnecessary RequiresUnreferencedCode attributes and redundant using directives to clean up the codebase.
Refines the condition for Android-specific settings to use TargetFramework.EndsWith('0-android'), adds PublishTrimmed property for Android builds, and sets PublishTrimmed to false for non-Android targets. This improves build configuration and output trimming behavior.
Android target frameworks are now commented out in Directory.Build.props, likely to avoid building Android targets by default. Also, a commented RuntimeIdentifierGraphPath line was removed from the SQLiteStudio example project for cleanup.
Removed 'net9.0-browserwasm' from UnoExampleCrossPlatformNet9 in Directory.Build.props to update supported target frameworks. Also removed the WithDefaultIScreen_HasRequiresUnreferencedCodeAttribute test from UnoReactiveUIBuilderExtensionsTests.cs, likely due to changes in method attributes or relevance.
Added a separate PropertyGroup to enable PublishTrimmed for iOS targets and updated the condition for disabling PublishTrimmed to exclude both Android and iOS. This ensures correct trimming behavior for different platforms.
Removed the solutionFile parameter from ci-build.yml and updated productNamespacePrefix in release.yml to 'ReactiveUI.Uno'. This aligns workflow configuration with the current project structure.
Added detailed XML comments to the ScheduleSlow<TState> method in UnoDispatcherScheduler.cs to improve code clarity and provide usage information for developers.
The line adding Apple Mobile Target Frameworks for macOS and Windows builds has been commented out in Directory.Build.props. This may be to temporarily disable building for Apple mobile platforms during certain builds.
Introduces new test classes for ReactivePage, ReactiveUserControl, RoutedViewHost, ViewModelViewHost, and internal helpers, significantly expanding test coverage for property, activation, and routing behaviors. Also enhances existing tests with additional assertions and affinity checks for DependencyObjectObservableForProperty and ActivationForViewFetcher.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #311 +/- ##
==========================================
+ Coverage 21.95% 25.92% +3.96%
==========================================
Files 16 16
Lines 1134 1134
Branches 171 171
==========================================
+ Hits 249 294 +45
+ Misses 877 832 -45
Partials 8 8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
What kind of change does this PR introduce?
Add Tests
What is the new behavior?
Introduces new test classes for ReactivePage, ReactiveUserControl, RoutedViewHost, ViewModelViewHost, and internal helpers, significantly expanding test coverage for property, activation, and routing behaviors. Also enhances existing tests with additional assertions and affinity checks for DependencyObjectObservableForProperty and ActivationForViewFetcher.
What might this PR break?
N/A Only new tests added
Please check if the PR fulfills these requirements
Other information: