DrupalPod
DrupalPod copied to clipboard
Unable to run FunctionalJavascriptTests
Describe the bug
When running FunctionalJavascriptTests with a default setup I see the following error:
1) Drupal\FunctionalJavascriptTests\Ajax\AjaxCallbacksTest::testDateAjaxCallback
WebDriver\Exception\UnknownError: unable to set cookie
(Session info: headless chrome=74.0.3729.157)
(Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 5.4.0-1051-gke x86_64)
To Reproduce
- Spin up DrupalPod from the link on the Github project
- Run the following commands:
composer require --dev phpspec/prophecy-phpunit:^2
ddev phpunit core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php
Expected behavior
Tests pass like below:
Testing Drupal\FunctionalJavascriptTests\Ajax\AjaxCallbacksTest
.. 2 / 2 (100%)
Time: 00:08.473, Memory: 4.00 MB
OK (2 tests, 8 assertions)
Additional context
I was able to reproduce the error in a local ddev setup using the same docker-compose.testing.yaml that was found in DrupalPod. After changing SIMPLETEST_BASE_URL: http://localhost to SIMPLETEST_BASE_URL: $DDEV_PRIMARY_URL and removing the same env vars from .ddev/commands/web/phpunit the tests pass, but I don't get the same result in DrupalPod.