Skip to content

Finish InputInjection Work + Fluent API Helper #176

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
2 of 9 tasks
michael-hawker opened this issue Jun 29, 2022 · 3 comments
Open
2 of 9 tasks

Finish InputInjection Work + Fluent API Helper #176

michael-hawker opened this issue Jun 29, 2022 · 3 comments
Labels
CI/pipeline 🔬 dev loop ➰ For issues that impact the core dev-loop of building experiments enhancement Improvement to an existing feature testing 🏗
Milestone

Comments

@michael-hawker
Copy link
Member

michael-hawker commented Jun 29, 2022

Following on from #124 and #161, we're waiting for 1.1.2 of WinAppSDK or beyond to make progress on this front due to blocking issues with CI and MSTest Discovery. (Also see MicrosoftDocs/windows-dev-docs#3887)

Once those are resolved in the WinAppSDK we can resume investigating our InputInjection approach which appears to work (at least for mouse click) without issue on UWP.

  • Investigate helper methods for more 'ui testing' scenarios
    • Since we own the apps and their deployment can we use more restricted capabilities like the InputInjection rescap? And does that work in WinUI 3 as well?
    • Does this work in the CI?
      • UWP
      • WinUI 3
  • Use GridSplitter as a test case and see if we can:
    • Test Localization (will be good test for UWP/WinUI 3 and resource loading)
    • Test a mouse drag (if we get injector working) replicate the UI Test we had for GridSplitter
  • Add Fluent API helper methods

From original thread comment:

Thanks @Sergio0694, yeah I was roughly thinking something like:

await SimulateInput.StartTouch()
                   .MouseDown(coord)
                   .MouseMove(cx, cy, seconds: 0.5, points: 10)
                   .MouseUp()
                   .Execute();

As we need to preface and end the operation with initializing/uninitializing the touch injector code, as well as generate/use a unique pointer id across the instructions (and if we want to use relative positioning between operations keep track of the initial point).

Anyway, bit more investigation to do, as not sure if this is going to run in the CI yet (though even then may have value).

Originally posted by @michael-hawker in #124 (comment)

Current work in llama/input-injection-test branch. Now in llama/input-injection-2025 in tooling and main repos.

@michael-hawker michael-hawker added enhancement Improvement to an existing feature testing 🏗 CI/pipeline 🔬 dev loop ➰ For issues that impact the core dev-loop of building experiments labels Jun 29, 2022
@michael-hawker michael-hawker added this to the Future milestone Jun 29, 2022
@michael-hawker
Copy link
Member Author

Good test cases for Keyboard driven scenarios would be the TokenizingTextBox:

  1. test clearing an inner text box and the text changing
  2. overwriting an existing token and typing a character and ensuring that's set in the textboxes (text and inner box)

See CommunityToolkit/WindowsCommunityToolkit#4749 (comment)

@michael-hawker
Copy link
Member Author

Since Sizers are in the main repo now, I've ported over the old branch (as a lot of our infrastructure has changed) to try tests over there: CommunityToolkit/Windows#681 now in llama/input-injection-2025 branches.

Still have the challenge of not knowing how to do mouse/touch move/drag operation though with the injection API. Doc issue is still open.

Does appear to work in WinUI 3 CI, though other test failure I think is still happening, so need to try for clean run, but saw the tests marked as passed and others running after them.

@michael-hawker
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/pipeline 🔬 dev loop ➰ For issues that impact the core dev-loop of building experiments enhancement Improvement to an existing feature testing 🏗
Projects
None yet
Development

No branches or pull requests

1 participant