test(postit.android): add Xamarin.UITest smoke test on emulator

Adds AndroidAppLaunchTests to PostIt.Tests, a Xamarin.UITest-based
smoke test that launches the installed com.CompanyName.PostIt app
on the running emulator and waits for the first Avalonia frame
to render. The test skips cleanly when the app is not installed.

Currently FAILS RED on the local emulator: the installed APK has
no Activity declared (am start returns result code=-92, ACTIVITY_NOT_FOUND),
and Xamarin.UITest's test server cannot reach /ping. This is a
guardian test that will turn green once EmbedAssembliesIntoApk=true
is set in PostIt.Android.csproj (follow-up commit).

Also adds a Debug launch config in .vscode/launch.json that runs
the test under vsdbg, enabling breakpoints and object inspection
when investigating the failure.
This commit is contained in:
Paul Schneider 2026-08-20 05:27:41 +01:00
commit 41cc651b7d
Signed by: notazof
GPG key ID: 1DD5D838E5343B06
4 changed files with 91 additions and 1 deletions

13
.vscode/launch.json vendored
View file

@ -28,6 +28,19 @@
"request": "launch",
"projectPath": "${workspaceFolder}/src/PostIt/PostIt.Desktop/PostIt.Desktop.csproj",
},
{
"name": "Test PostIt.Android launch (Xamarin.UITest)",
"type": "coreclr",
"request": "launch",
"program": "${workspaceFolder}/src/PostIt.Tests/bin/Debug/net10.0/PostIt.Tests.dll",
"args": [
"--filter-method",
"PostIt.Tests.AndroidAppLaunchTests.PostIt_starts_and_draws_a_first_frame_on_the_emulator"
],
"cwd": "${workspaceFolder}/src/PostIt.Tests",
"console": "integratedTerminal",
"stopAtEntry": false
}
]
}