- Merge request !175Issue #3550652 by dydave: Automated tests: Simplified 'admin_toolbar_search'... → (Open) created by dydave
FunctionJavascript tests take much longer to run than Functional tests, that's why they should stay focused on really testing the Javascript features of the module and more specifically: Try to test as much code from admin_toolbar_search.js as possible.
Currently, a lot of modules' logic tested in admin_toolbar_search FunctionalJavascript test classes could actually be tested with Functional tests and in fact has already been addressed in 📌 Automated Tests: Add Functional tests for classes ExtraLinks and SearchLinks Needs review .
Most of the logic tested in \Drupal\Tests\admin_toolbar_search\FunctionalJavascript\AdminToolbarSearchTest has already been moved to Drupal\Tests\admin_toolbar_search\Functional\AdminToolbarSearchSettingsFormTest, so it could grealy be simplified, to focus mostly on testing the JS search autocomplete features of the module.
All the logic related with the creation of entity type bundles, such as Media types, Content types or Menus could be removed in files:
admin_toolbar_search/tests/src/FunctionalJavascript/AdminToolbarSearchTestBase.php
admin_toolbar_search/tests/src/FunctionalJavascript/AdminToolbarToolsSearchTest.php
Since all of these tests should now be addressed and covered by Functional test classes in 'admin_toolbar_tools', see related issue.
The same goes for any logic related with creating, updating or deleting entity type bundles.
Run PHPUNIT Tests for the admin_toolbar_search
module.
Run PHPUNIT FunctionalJavascript Test AdminToolbarToolsSearchTest
.
Run PHPUNIT FunctionalJavascript Test AdminToolbarSearchTest
.
Update existing FunctionJavascript classes to only really keep tests for the Javascript logic specific to the 'admin_toolbar_search' module.
In particular, try testing how the admin_toolbar_tools modules integrates with the JS logic of the module, by loading extra links via AJAX.
Active
3.0
Automated tests
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.