Skip to content
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

Fix up tests after Shell runs #4970

Merged
merged 2 commits into from
Mar 1, 2022
Merged

Fix up tests after Shell runs #4970

merged 2 commits into from
Mar 1, 2022

Conversation

PureWeen
Copy link
Member

@PureWeen PureWeen commented Feb 28, 2022

Description of Change

  • Shell sets the background of the decorview to a specialized "splitDrawable" that was breaking the UnitTests after a run. The background now just gets reset to pre-shell state so that tests remain runnable
  • The NavigationRootManager was being added to the WrapperView as a WeakReference which means that sometimes it would get cleaned up by the GC since that's the only reference. The NavigationRootManager needs to exist as a strong reference inside the WrappedServiceProvider
    • This fixed an issue where various tests would occasionally fail with "NavigationRootManager" not found
  • Fixed up some fragments inside shell so they create a new scoped MauiContext with the correct inflater/childsupportmanager
  • Fixed Editor test on WinUI so that it adds the editor to the VisualTree. This is required in order for the editor field to measure at all

Testing

  • verify tests all run properly in visual runner and that you can run and re-run them
  • verify Android Shell still works

@PureWeen PureWeen enabled auto-merge (squash) February 28, 2022 22:16
@PureWeen PureWeen merged commit eef07bf into main Mar 1, 2022
@PureWeen PureWeen deleted the fix_shell_uitests branch March 1, 2022 00:25
@samhouts samhouts added area-controls-shell Shell Navigation, Routes, Tabs, Flyout platform/android 🤖 labels Jul 11, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@samhouts samhouts added the fixed-in-6.0.200-preview.14.2 Look for this fix in 6.0.200-preview.14.2! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout fixed-in-6.0.200-preview.14.2 Look for this fix in 6.0.200-preview.14.2! platform/android 🤖
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants