Closed stephen-cox closed 11 months ago
Here's the tests that are failing locally with lando.
www-data@6e77ec0c5369:/app$ phpunit web/modules/contrib/localgov_microsites_group/
PHPUnit 9.6.11 by Sebastian Bergmann and contributors.
Testing /app/web/modules/contrib/localgov_microsites_group
....EEEEEEEE...EEEEEEE EE.. 26 / 26 (100%)
Time: 11:06.145, Memory: 14.00 MB
There were 17 errors:
1) Drupal\Tests\localgov_microsites_events\Functional\MicrositeEventContentTest::testMicrositeEventsView
Exception: Warning: Undefined array key "group"
Drupal\localgov_microsites_group\GroupPermissionsHelper->moduleStatus()() (Line: 99)
/app/web/core/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php:47
/app/vendor/guzzlehttp/promises/src/Promise.php:209
/app/vendor/guzzlehttp/promises/src/Promise.php:158
/app/vendor/guzzlehttp/promises/src/TaskQueue.php:52
/app/vendor/guzzlehttp/promises/src/Promise.php:251
/app/vendor/guzzlehttp/promises/src/Promise.php:227
/app/vendor/guzzlehttp/promises/src/Promise.php:272
/app/vendor/guzzlehttp/promises/src/Promise.php:229
/app/vendor/guzzlehttp/promises/src/Promise.php:69
/app/vendor/guzzlehttp/guzzle/src/Client.php:189
/app/web/core/tests/Drupal/Tests/DrupalTestBrowser.php:137
/app/vendor/symfony/browser-kit/AbstractBrowser.php:403
/app/vendor/symfony/browser-kit/AbstractBrowser.php:603
/app/vendor/symfony/browser-kit/AbstractBrowser.php:421
/app/vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php:111
/app/vendor/behat/mink/src/Session.php:148
/app/web/core/tests/Drupal/Tests/UiHelperTrait.php:237
/app/web/modules/contrib/localgov_microsites_group/modules/localgov_microsites_events/tests/src/Functional/MicrositeEventContentTest.php:130
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
2) Drupal\Tests\localgov_microsites_events\Functional\MicrositeEventContentTest::testMicrositeEventsSearch
Exception: Warning: Undefined array key "group"
Drupal\localgov_microsites_group\GroupPermissionsHelper->moduleStatus()() (Line: 99)
/app/web/core/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php:47
/app/vendor/guzzlehttp/promises/src/Promise.php:209
/app/vendor/guzzlehttp/promises/src/Promise.php:158
/app/vendor/guzzlehttp/promises/src/TaskQueue.php:52
/app/vendor/guzzlehttp/promises/src/Promise.php:251
/app/vendor/guzzlehttp/promises/src/Promise.php:227
/app/vendor/guzzlehttp/promises/src/Promise.php:272
/app/vendor/guzzlehttp/promises/src/Promise.php:229
/app/vendor/guzzlehttp/promises/src/Promise.php:69
/app/vendor/guzzlehttp/guzzle/src/Client.php:189
/app/web/core/tests/Drupal/Tests/DrupalTestBrowser.php:137
/app/vendor/symfony/browser-kit/AbstractBrowser.php:403
/app/vendor/symfony/browser-kit/AbstractBrowser.php:603
/app/vendor/symfony/browser-kit/AbstractBrowser.php:421
/app/vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php:111
/app/vendor/behat/mink/src/Session.php:148
/app/web/core/tests/Drupal/Tests/UiHelperTrait.php:237
/app/web/modules/contrib/localgov_microsites_group/modules/localgov_microsites_events/tests/src/Functional/MicrositeEventContentTest.php:154
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
3) Drupal\Tests\localgov_microsites_events\Functional\MicrositeEventViewAccesTest::testMicrositeEventsViewAccess
Undefined array key "group"
/app/web/modules/contrib/localgov_microsites_group/src/GroupPermissionsHelper.php:99
/app/web/modules/contrib/localgov_microsites_group/src/GroupPermissionsHelper.php:73
/app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:388
/app/web/modules/contrib/localgov_microsites_group/src/GroupPermissionsHelper.php:74
/app/web/modules/contrib/localgov_microsites_group/src/GroupPermissionsHelper.php:174
/app/web/modules/contrib/localgov_microsites_group/modules/localgov_microsites_events/tests/src/Functional/MicrositeEventViewAccesTest.php:86
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
4) Drupal\Tests\localgov_microsites_group_term_ui\Functional\ManageGroupTermsTest::testGroupTermUi
Behat\Mink\Exception\ElementNotFoundException: Button with id|name|label|value "Save and go to list" not found.
/app/web/core/tests/Drupal/Tests/WebAssert.php:144
/app/web/core/tests/Drupal/Tests/UiHelperTrait.php:77
/app/web/modules/contrib/localgov_microsites_group/modules/localgov_microsites_group_term_ui/tests/src/Functional/ManageGroupTermsTest.php:86
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
5) Drupal\Tests\localgov_microsites_group_term_ui\Functional\ManageGroupTermsTest::testGroupTermPermissions
Behat\Mink\Exception\ExpectationException: Current response status code is 500, but 403 expected.
/app/vendor/behat/mink/src/WebAssert.php:794
/app/vendor/behat/mink/src/WebAssert.php:130
/app/web/modules/contrib/localgov_microsites_group/modules/localgov_microsites_group_term_ui/tests/src/Functional/ManageGroupTermsTest.php:124
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
6) Drupal\Tests\localgov_microsites_group_term_ui\Kernel\GroupTermEntityReferenceTest::testGroupTermReference
Exception: Exception when installing config for module localgov_microsites_group_term_ui_test, message was: The 'user.role.authenticated' config does not exist.
/app/web/core/tests/Drupal/KernelTests/KernelTestBase.php:730
/app/web/modules/contrib/localgov_microsites_group/modules/localgov_microsites_group_term_ui/tests/src/Kernel/GroupTermEntityReferenceTest.php:44
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
Caused by
Drupal\Core\Entity\EntityMalformedException: The 'user.role.authenticated' config does not exist.
/app/web/modules/contrib/group/src/Entity/Storage/GroupRoleStorage.php:95
/app/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php:483
/app/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:257
/app/web/core/lib/Drupal/Core/Entity/EntityBase.php:339
/app/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
/app/web/core/lib/Drupal/Core/Config/ConfigInstaller.php:388
/app/web/core/lib/Drupal/Core/Config/ConfigInstaller.php:148
/app/web/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php:75
/app/web/core/tests/Drupal/KernelTests/KernelTestBase.php:727
/app/web/modules/contrib/localgov_microsites_group/modules/localgov_microsites_group_term_ui/tests/src/Kernel/GroupTermEntityReferenceTest.php:44
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
7) Drupal\Tests\localgov_microsites_group\Functional\MicrositeNewsContentTest::testMicrositeNewsContent
RuntimeException: Adding non-existent permissions to a role is not allowed. The incorrect permissions are "view directory facets".
/app/web/core/modules/user/src/Entity/Role.php:207
/app/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:321
/app/web/core/modules/user/src/Entity/Role.php:179
/app/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php:528
/app/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php:483
/app/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:257
/app/web/core/lib/Drupal/Core/Entity/EntityBase.php:339
/app/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
/app/web/core/modules/user/user.module:990
/app/web/modules/contrib/localgov_microsites_group/src/RolesHelper.php:56
/app/web/modules/contrib/localgov_microsites_group/localgov_microsites_group.module:42
/app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:409
/app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:388
/app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:416
/app/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php:381
/app/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php:83
/app/web/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:465
/app/web/core/tests/Drupal/Tests/BrowserTestBase.php:557
/app/web/core/tests/Drupal/Tests/BrowserTestBase.php:367
/app/web/modules/contrib/localgov_microsites_group/modules/localgov_microsites_news/tests/src/Functional/MicrositeNewsContentTest.php:57
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
8) Drupal\Tests\localgov_microsites_group\Functional\MicrositeNewsContentTest::testMicrositeNewsSearch
RuntimeException: Adding non-existent permissions to a role is not allowed. The incorrect permissions are "view directory facets".
/app/web/core/modules/user/src/Entity/Role.php:207
/app/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:321
/app/web/core/modules/user/src/Entity/Role.php:179
/app/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php:528
/app/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php:483
/app/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:257
/app/web/core/lib/Drupal/Core/Entity/EntityBase.php:339
/app/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
/app/web/core/modules/user/user.module:990
/app/web/modules/contrib/localgov_microsites_group/src/RolesHelper.php:56
/app/web/modules/contrib/localgov_microsites_group/localgov_microsites_group.module:42
/app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:409
/app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:388
/app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:416
/app/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php:381
/app/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php:83
/app/web/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:465
/app/web/core/tests/Drupal/Tests/BrowserTestBase.php:557
/app/web/core/tests/Drupal/Tests/BrowserTestBase.php:367
/app/web/modules/contrib/localgov_microsites_group/modules/localgov_microsites_news/tests/src/Functional/MicrositeNewsContentTest.php:57
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
9) Drupal\Tests\localgov_microsites_group\Functional\MicrositeCreationTest::testMicrositeCreationForm
Drupal\Core\Entity\Query\QueryException: Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck().
/app/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php:141
/app/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php:80
/app/web/modules/contrib/localgov_microsites_group/tests/src/Functional/MicrositeCreationTest.php:87
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
10) Drupal\Tests\localgov_microsites_group\Functional\MicrositeSitewideSearchTest::testMicrositeSitewideSearch
Indirect modification of overloaded property Drupal\Tests\localgov_microsites_group\Functional\MicrositeSitewideSearchTest::$pages1 has no effect
/app/web/modules/contrib/localgov_microsites_group/tests/src/Functional/MicrositeSitewideSearchTest.php:81
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
11) Drupal\Tests\localgov_microsites_group\Functional\ModuleSettingsFormTest::testDomainGroupForm
Drupal\Core\Extension\Exception\UnknownExtensionException: Unknown themes: classy.
/app/web/core/lib/Drupal/Core/Extension/ThemeInstaller.php:138
/app/web/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:431
/app/web/core/tests/Drupal/Tests/BrowserTestBase.php:556
/app/web/core/tests/Drupal/Tests/BrowserTestBase.php:367
/app/web/modules/contrib/localgov_microsites_group/tests/src/Functional/ModuleSettingsFormTest.php:57
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
12) Drupal\Tests\localgov_microsites_group\Functional\ModuleSettingsFormTest::testGroupManagementAccess
Drupal\Core\Extension\Exception\UnknownExtensionException: Unknown themes: classy.
/app/web/core/lib/Drupal/Core/Extension/ThemeInstaller.php:138
/app/web/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:431
/app/web/core/tests/Drupal/Tests/BrowserTestBase.php:556
/app/web/core/tests/Drupal/Tests/BrowserTestBase.php:367
/app/web/modules/contrib/localgov_microsites_group/tests/src/Functional/ModuleSettingsFormTest.php:57
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
13) Drupal\Tests\localgov_microsites_group\Kernel\GroupDefaultContentTest::testGenerate
Exception: Exception when installing config for module localgov_microsites_group, message was: The 'user.role.authenticated' config does not exist.
/app/web/core/tests/Drupal/KernelTests/KernelTestBase.php:730
/app/web/modules/contrib/localgov_microsites_group/tests/src/Kernel/GroupDefaultContentTest.php:63
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
Caused by
Drupal\Core\Entity\EntityMalformedException: The 'user.role.authenticated' config does not exist.
/app/web/modules/contrib/group/src/Entity/Storage/GroupRoleStorage.php:95
/app/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php:483
/app/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:257
/app/web/core/lib/Drupal/Core/Entity/EntityBase.php:339
/app/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
/app/web/core/lib/Drupal/Core/Config/ConfigInstaller.php:388
/app/web/core/lib/Drupal/Core/Config/ConfigInstaller.php:148
/app/web/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php:75
/app/web/core/tests/Drupal/KernelTests/KernelTestBase.php:727
/app/web/modules/contrib/localgov_microsites_group/tests/src/Kernel/GroupDefaultContentTest.php:63
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
14) Drupal\Tests\localgov_microsites_group\Kernel\GroupPermissionsHelperTest::testGetPermissions
Drupal\Core\Entity\Query\QueryException: Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck().
/app/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php:141
/app/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php:80
/app/web/modules/contrib/group_permissions/src/Plugin/Validation/Constraint/UniqueReferenceFieldValidator.php:39
/app/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php:202
/app/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php:154
/app/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php:164
/app/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php:106
/app/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveValidator.php:93
/app/web/core/lib/Drupal/Core/TypedData/TypedData.php:132
/app/web/core/lib/Drupal/Core/Entity/ContentEntityBase.php:485
/app/web/modules/contrib/localgov_microsites_group/tests/src/Kernel/GroupPermissionsHelperTest.php:153
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
15) Drupal\Tests\localgov_microsites_group\Kernel\GroupPermissionsHelperTest::testToggleModulePermissions
Undefined array key "group"
/app/web/modules/contrib/localgov_microsites_group/src/GroupPermissionsHelper.php:99
/app/web/modules/contrib/localgov_microsites_group/tests/src/Kernel/GroupPermissionsHelperTest.php:164
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
16) Drupal\Tests\localgov_microsites_group\Kernel\GroupPermissionsHelperTest::testAlteredGroupPermissions
Drupal\Core\Entity\Query\QueryException: Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck().
/app/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php:141
/app/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php:80
/app/web/modules/contrib/group_permissions/src/Plugin/Validation/Constraint/UniqueReferenceFieldValidator.php:39
/app/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php:202
/app/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php:154
/app/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php:164
/app/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php:106
/app/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveValidator.php:93
/app/web/core/lib/Drupal/Core/TypedData/TypedData.php:132
/app/web/core/lib/Drupal/Core/Entity/ContentEntityBase.php:485
/app/web/modules/contrib/localgov_microsites_group/tests/src/Kernel/GroupPermissionsHelperTest.php:192
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
17) Drupal\Tests\localgov_microsites_group\Kernel\GroupPermissionsHelperTest::testModulesList
Undefined array key "group"
/app/web/modules/contrib/localgov_microsites_group/src/GroupPermissionsHelper.php:99
/app/web/modules/contrib/localgov_microsites_group/src/GroupPermissionsHelper.php:73
/app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:388
/app/web/modules/contrib/localgov_microsites_group/src/GroupPermissionsHelper.php:74
/app/web/modules/contrib/localgov_microsites_group/tests/src/Kernel/GroupPermissionsHelperTest.php:203
/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
ERRORS!
Tests: 26, Assertions: 357, Errors: 17.
@finnlewis Looks like we still don't have a 3.x alpha release on the project. Can this be looked at the next Merge Monday or shall we just do it?
I will leave this for Finn to review. Most changes are to do with ddev and I am not really familiar with it. Rest of the changes look okay to me.
Just to confirm discussion, we're happy to make an alpha release even though there are stil failing tests.
The failing tests are also failing on the 2.x branch and highlight a problem with group_permissions .
See https://github.com/localgovdrupal/localgov_microsites_group/issues/428
Once all the tests pass this can be reviewed at the same time as https://github.com/localgovdrupal/localgov_microsites/pull/401