- Issue created by @murz
- Merge request !8836Issue #3462368: Enable hidden modules for Nightwatch and other functional tests. β (Open) created by murz
- Status changed to Needs review
4 months ago 7:53am 19 July 2024 - π¦π²Armenia murz Yerevan, Armenia
I found a place where we can enable hidden modules for functional tests and made an MR https://git.drupalcode.org/project/drupal/-/merge_requests/8836
If this approach is okay, I can write a test to check this feature.
- Status changed to RTBC
4 months ago 6:23pm 20 July 2024 - πΊπΈUnited States smustgrave
Makes 100% sense to me to be able to install test modules.
- Status changed to Needs work
4 months ago 9:17pm 21 July 2024 - π«π·France nod_ Lille
That makes sense to me, do we have a use case for this today? if it helps existing tests we should convert at least one to showcase this.
- π¦π²Armenia murz Yerevan, Armenia
That makes sense to me, do we have a use case for this today? if it helps existing tests we should convert at least one to showcase this.
There are no use cases for now because installing the hidden modules from Nightwatch tests is impossible.
So, for now, all of the tests that use hidden modules, are written with PHPUnit.I can write a new separate Nigtwatch test to reproduce and check this feature, but I think it will be just spending time on our pipelines.
- Status changed to Needs review
4 months ago 7:06am 22 July 2024 - π¦π²Armenia murz Yerevan, Armenia
Seems we have another way to hide modules, intended only for tests - instead of using the parameter:
hidden: true
we can put all test modules into thetests
subdirectory of the module.
Then, they will be visible only in the test environment, and work well for Nightwatch tests too.Example: https://git.drupalcode.org/project/search_api/-/tree/8.x-1.x/tests/modul...
So, seems that marking test modules as hidden, is an outdated approach.
Therefore, instead of allowing hidden modules in tests, let's update the documentation at the page https://www.drupal.org/docs/develop/creating-modules/let-drupal-know-abo... β then? I updated the documentation now by adding:
For modules, intended only for tests, it's better to place them into the tests/modules subdirectory, instead of making them as hidden.
If it sounds okay for you, let's close the issue then?
- Status changed to Closed: works as designed
4 months ago 9:44am 22 July 2024 - π¬π§United Kingdom alexpott πͺπΊπ
+1 to closing this as works as designed. Maybe some docs are missing. The fix in the MR would change settings.php for all test environments which would not be the correct fix here - but yeah there is no fix to do here :)