Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run FunctionalJavascriptTests #55

Open
mstrelan opened this issue Nov 12, 2021 · 0 comments
Open

Unable to run FunctionalJavascriptTests #55

mstrelan opened this issue Nov 12, 2021 · 0 comments

Comments

@mstrelan
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant