Problem/Motivation
Currently the admin_toolbar_search module does not have any Tests in place to run the code of its Settings form AdminToolbarSearchSettingsForm.
There is currently no way to test whether the form could be properly submitted or not.
Steps to reproduce
Run PHPUNIT Tests or build pipeline at:
https://git.drupalcode.org/project/admin_toolbar/-/pipelines
Proposed resolution
Add a basic Functional Test class, which displays the form, submits it with default values and checks whether the submission was successful.
We could just copy the current Test class for the AdminToolbarToolsSettingsForm in the admin_toolbar_tools module, see:
https://git.drupalcode.org/project/admin_toolbar/-/blob/3.x/admin_toolba...
See similar ticket: #3466743: [AdminToolbarToolsSettingsForm] Add basic automated Functional test
Issue fork admin_toolbar-3519967
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 #2
dydave commentedComment #5
dydave commentedQuick follow-up on this issue:
Copied over the same Tests class from the
admin_toolbar_toolsmodule and made a few adjustments to match with theadmin_toolbar_searchmodule.This is a very basic initial Tests class, with the bare minimum:
admin/config/user-interface/admin-toolbar-search-settingsSince all the jobs and tests were still passing 🟢, I went ahead and merged the changes above at #4.
This class should allow us to detect any issues with the schema or any other form related code and be used as the basis for adding more checks and automated tests for the
admin_toolbar_searchmodule.Marking issue as Fixed for now.
Thanks in advance!