Fix to pass additional args from the Flutter test template (#7261)#8836
Fix to pass additional args from the Flutter test template (#7261)#8836pq merged 3 commits intoflutter:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request correctly fixes an issue where additional arguments from a test run configuration template were not being preserved. The change involves explicitly copying the additionalArgs from the existing configuration to the newly created TestFields. While the fix is correct, there is some code duplication across the setupForSingleTest, setupForDartFile, and setupForDirectory methods. I've left a comment with a suggestion to refactor this for better maintainability.
|
@dkandalov seems reasonable. Were you able to run this in the workbench (or build the plugin) and test it out? Can you note the different situations to test given that there are changes in a few different methods? |
|
I suspect this also doesn't work for run configurations. It may make sense to have a fix for run configurations as well, though this could be a separate issue. |
|
Hi @helin24.
|
Good point. I tried modifying "Flutter" template and then creating a new non-test run config for Flutter and it does have additional args from the template, so there is no issue with that 🤔 |
|
Great, thanks for the test steps and looking into flutter run. That makes me feel more confident that having templates args in config when we run from the file is intended behavior. Can you address the one comment from gemini and also update the changelog and add yourself to the AUTHORS file? |
|
I updated AUTHORS and applied the refactoring as suggested by Gemini (the refactoring doesn't seem quite right to me but I couldn't come up something much better). |
helin24
left a comment
There was a problem hiding this comment.
Thanks for addressing the comments! This LGTM
Fix to pass additional args from the Flutter test template (#7261)
Contribution guidelines:
dart format.