Skip to content

🚧 Input Injection Test API Tests... #681

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

michael-hawker
Copy link
Member

@michael-hawker michael-hawker commented May 8, 2025

Was initiative started with the initial Sizer controls when in Labs. Prior PR in Labs: CommunityToolkit/Labs-Windows#183

Also needs Tooling Branch: https://github.com/CommunityToolkit/Tooling-Windows-Submodule/tree/llama/input-injection-2025

TODO: More fluent API surface and figuring out how to do a Drag operation instead of just Click... 😅

API: https://learn.microsoft.com/en-us/uwp/api/windows.ui.input.preview.injection.inputinjector.initializetouchinjection

Other docs: https://learn.microsoft.com/en-us/windows/apps/design/input/input-injection

Still, as far as I see all the examples are simple clicks down/up and don't explain drag. 🥲 Doc issue: MicrosoftDocs/windows-dev-docs#3887

Toolkit Tracking issue: CommunityToolkit/Labs-Windows#176

…to test Sizer controls

See: CommunityToolkit/Labs-Windows#183
And Tooling Branch: https://github.com/CommunityToolkit/Tooling-Windows-Submodule/tree/llama/input-injection-2025
TODO: More fluent API surface and figuring out how to do a Drag operation instead of just Click... 😅
@michael-hawker
Copy link
Member Author

First force-push was for XAML Styling, think I had turned it off elsewhere locally, need to turn it back on.
2nd was for forgetting to remove unneeded namespaces from new XAML file, as we have global usings, so UWP failed as it had the WinUI ones.

@michael-hawker michael-hawker force-pushed the llama/input-injection-2025 branch from c6db641 to 47290d4 Compare May 8, 2025 20:00
@michael-hawker
Copy link
Member Author

Huh, I saw the WinUI 3 input tests pass yesterday, today it's failing:

Failed InputInjection_TestClickButton_SizerInputTestClass_Test [8 s]
Error Message:
Assert.IsTrue failed. Button wasn't clicked.
Stack Trace:
at SizersTests.SizerInputTestClass.InputInjection_TestClickButton(TouchInjectionTest testControl) in D:\a\Windows\Windows\components\Sizers\tests\SizerInputTestClass.cs:line 56
at SizersTests.SizerInputTestClass.<InputInjection_TestClickButton_SizerInputTestClass_Test>b__3_0() in //ProjectHeads/AllComponents/Tests.Wasdk/obj/x64/Release/net9.0-windows10.0.19041.0/win-x64/CommunityToolkit.Tooling.TestGen/CommunityToolkit.Tooling.TestGen.UIThreadTestMethodGenerator/InputInjection_TestClickButton_SizerInputTestClass.g.cs:line 20
at CommunityToolkit.WinUI.DispatcherQueueExtensions.<>c__DisplayClass3_0.<b__1>d.MoveNext() in /
/components/Extensions/src/Dispatcher/DispatcherQueueExtensions.cs:line 180
--- End of stack trace from previous location ---
at Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.ThreadOperations.ExecuteWithAbortSafety(Action action)

Very odd, not sure what might be up there. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant