-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Add DropdownButtonFormField value param test #170518
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
Add DropdownButtonFormField value param test #170518
Conversation
60ff254 to
7dd90cb
Compare
|
Should this have an issue? Never seen a PR that just adds a test. |
bleroux
left a comment
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.
Thanks for filing this PR!
This test is badly required as no existing test is checking the reset function and the mapping of DropdownButtonFormField.value to FormFieldState.initialValue.
I wrote some suggestions to improve readability.
In that particular case, you can link to #170050, it is the best way to give context to reviewers and future contributors. On a side note, it is true that PRs that just add tests are not common, but it is always useful to improve test coverage (I filed several PRs to add mlssing M3 tests for InputDecoration and still need to file some 😅 ) |
|
I've made the requested changes, please take a look. |
bleroux
left a comment
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.
LGTM!
With such a test, a change such as #170050 will failed. Thanks for improving the test coverage 🙏
I just let some very minor suggestions.
Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com>
justinmc
left a comment
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.
LGTM 👍 Thanks for following up from the other PR to make this test change.
This PR adds a new test that verifies that the value param is only used on initial build and when resetting the field. Test for flutter#170050 (comment) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com>
This PR adds a new test that verifies that the value param is only used on initial build and when resetting the field.
Test for #170050 (comment)
Pre-launch Checklist
///).