generated from ddev/ddev-addon-template
-
-
Couldn't load subscription status.
- Fork 23
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
I've been struggling to get Drupal Nightwatch tests running at all, but this appears to be a bug worth sharing:
If I start running tests, and ^C before they finish, the web container will never connect to the selenium-chrome container again until I ddev restart.
Copy/Pasted output for search-ability:
andy@drupal-tests-web:/var/www/html/core$ yarn test:nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js
yarn run v1.22.19
$ node -r dotenv-safe/config ./node_modules/.bin/nightwatch --config ./tests/Drupal/Nightwatch/nightwatch.conf.js tests/Drupal/Nightwatch/Tests/exampleTest.js
[Tests/Example Test] Test Suite
──────────────────────────────────────────────────────────────
ℹ Connected to selenium-chrome on port 4444 (585ms).
Using: chrome (101.0.4951.41) on LINUX.
ℹ Loaded url http://web in 181ms
Running Test page:
───────────────────────────────────────────────────────────────────────────────────────────────────
ℹ Loaded url http://web/test-page in 263ms
✔ Element <body> was visible after 53 milliseconds.
✔ Testing if element <body> contains text 'Test page text' (59ms)
✨ PASSED. 2 assertions. (443ms)
Running Page objects test page:
───────────────────────────────────────────────────────────────────────────────────────────────────
ℹ Loaded url http://web/test-page in 142ms
✔ Element <body> was visible after 34 milliseconds.
✔ Testing if element <Element [name=@body]> contains text 'Test page text' (28ms)
✔ Ensuring no deprecation errors have been triggered (11ms)
✨ PASSED. 3 assertions. (292ms)
^C
andy@drupal-tests-web:/var/www/html/core$ yarn test:nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js
yarn run v1.22.19
$ node -r dotenv-safe/config ./node_modules/.bin/nightwatch --config ./tests/Drupal/Nightwatch/nightwatch.conf.js tests/Drupal/Nightwatch/Tests/exampleTest.js
[Tests/Example Test] Test Suite
──────────────────────────────────────────────────────────────
⠹ Connecting to selenium-chrome on port 4444...
Error
POST http://selenium-chrome:4444 /wd/hub/session - ECONNRESET
Error: socket hang up
at Socket.socketCloseListener (node:_http_client:467:25)
at Socket.emit (node:events:525:35)
at Socket.emit (node:domain:489:12)
⠧ Connecting to selenium-chrome on port 4444...
^C
andy@drupal-tests-web:/var/www/html/core$
I'll also leave a screenshot version in case people prefer reading with the color-coded outputs:
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed
