Application.ModalPopped never fires when run in Unit Test.
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 297
Description
### Description
I'm working on porting the [KAMISHIBAI](https://github.com/nuitsjp/KAMISHIBAI) MVVM library from Xamarin.Forms to MAUI. I've bumped the version of Xamarin.Forms to the newest stable release and all of the tests pass. However, switching it over to MAUl, I have some failures.
In `ApplicationAdapter_ModalPopped`, the current `Application` should be posting an event when a modal window closes. This event never fires. For the Forms tests, this code works fine.
I made a MAUI Repo project where I attached to Application.ModalPopped, and those did fire correctly. But if I run the same code from a unit test project, it doesn't work.
[MauiTempTest.zip](https://github.com/dotnet/maui/files/8655781/MauiTempTest.zip)
Any ideas?


CC @nuitsjp, since it's your library.
### Steps to Reproduce
1. Check out my branch (https://github.com/drasticactions/KAMISHIBAI/tree/maui-port/MAUI/Source)
2. Open the solution
3. Run the test `ApplicationAdapter_ModalPopped`
It shouldn't require extra dependencies or special versions of MAUI.
### Version with bug
Release Candidate 2 (current)
### Last version that worked well
Unknown/Other
### Affected platforms
I was *not* able test on other platforms
### Affected platform versions
This affects Testing Libraries. As far as I can tell, it does not affect the platforms themselves.
### Did you find any workaround?
_No response_
### Relevant log output
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.