Problem/Motivation
There are several widgets left that have no test coverage.
Proposed resolution
Provide functional test coverage for remaining widgets, catch any bugs and resolve.
Review notes
This MR is quite extensive with a large number of files but the majority are fall under 2 categories: docs and tests.
Docs - several docs updates were made to ensure accuracy in the settings with the actual settings from the classes and to provide any further notes where needed to help users.
Tests - All widgets including those provided by sub-modules have Functional and FunctionalJavascript (where applicable) test coverage now which are designed to cover everything from relevant form ui settings to the widget itself.
The rest of the changes were mostly safeguards to prevent error (which the tests validate), a few phpstan warnings that fell under widgets and a few notable files as in the case of:
- DateRangeWidgetBase (all day functionality)
- EntityReferenceBrowserWidget (better code organization, safe guarding massageFormValue, and adding parents to the unique formState key that fully supports this widget for fields attached to paragraphs.
- DurationWidget - Some dead code was removed.
- DecimalWidget - Standardizing the #min attribute to match consistency with IntegerWidget.
- Time.php - This was just a safeguard to prevent an error that would likely never happen but just normalizes the param for extra safety. An additional section was added to its unit test also for extra validation.
- src/Element/DatetimeBase.php - Set correct date/time format for datetime-local when seconds are enabled.
Issue fork custom_field-3615959
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
apmsooner commentedComment #4
apmsooner commentedComment #5
nicxvan commentedI did a code level review of this.
I did not review doc changes or the tests.
I only skimmed EntityReferenceBrowserWidget since it was a fairly significant change, I don't use that widget I think.
The other non test changes look good to me. I've not had a chance to do manual testing.
Comment #6
apmsooner commentedComment #8
apmsooner commentedComment #10
apmsooner commented