-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix issue with template processing #26196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add a test? also can you create a issue associated with this?
Unfortunately the template tests only create, build, and maybe publish the templates. None of the tests run the apps built by the template. It's certainly possible (somehow), but we don't do it at this time. I think you'd need to do that in order to test this? |
We could check the new template for the line |
We could... but that's pretty random. Why check this one thing but not anything else? |
What else can we check? We would have to set up a template and then run it and then somehow communicate with the running ap to determine which handler is in use. |
Yeah I think that's the only meaningful way to test it. I'm not at all saying it's easy: it's probably not. A pattern I've seen before is to:
But if the test is just to check that the template output contains a string, I wouldn't even bother. It's not verifying the code is correct or even executed at all, let alone if it has the desired effect in the running app. And on top of that it's a very fragile test because a lot of changes that could be good changes could cause this test to fail (say we change MAUI to have this be built-in and not needed in the template, this test could start failing, even though there's nothing wrong). |
/rebase |
a40a336
to
3eb5d06
Compare
The handler registration is temporary and will be the default at some point soon. Also, I am testing the template result, not whether it is used. I can make a more complex test, but I don't think it is worth it because it is all going away soon. |
Added a test and the new issue is #27055
/rebase |
The template is processing the actual code
e4050b4
to
684681d
Compare
Description of Change
The template is processing the actual code
Fixes #27055