-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Setup Unit Test Infrastructure for VisualTree related tests #3746
Setup Unit Test Infrastructure for VisualTree related tests #3746
Conversation
Required some new Test Infrastructure adapted from WinUI setup, but simplified. However, running into deadlock with TaskCompletionSource after test execution (test itself is succeeding) This may help? https://devblogs.microsoft.com/premier-developer/the-danger-of-taskcompletionsourcet-class/
Thanks michael-hawker for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
Let's get the initial infrastructure merged to unblock James and then I can add more tests in another PR. |
Hello @michael-hawker! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@jamesmcroft you should be able to copy the test I added here for the Visual Tree and use that to add a control into the Test App and then poke it for the Automation Peer info. Let me know if you need more info than that, we should have more info in the Wiki anyway. |
Supports #3685
We want to add some additional tests to the existing helpers so that we can then port them to the work being done in #3685 and have confidence that we haven't broken anything with the refactor.
However, our current Unit Tests/Integration Test environments didn't support having UI layout/rendering occur while also inspecting it at a detailed level. This PR adds a new helper base class for tests which require this functionality based off of similar work done in the WinUI testing infrastructure. Thanks @chingucoding for the pointers!
I've simplified their implementation and supplemented helpers we have in the Toolkit to encapsulate our basic needs here.
TODO:
FYI @jamesmcroft this should make adding a test easier for #3507 as well! 🎉🎉🎉 I'll try and write up some docs for this, but it should be more straight-forward now within the Unit Test infrastructure.