docker4drupal icon indicating copy to clipboard operation
docker4drupal copied to clipboard

Which setup to run Nightwatch tests?

Open MXTcomunica opened this issue 1 year ago • 3 comments

Codebase Mounted codebase

Describe your issue Which is the correct setup to allow Nightwatch tests to run? I'm on Drupal 10, and trying to run Nightwatch inside D4D environment, but without success. Don't know if useful: Chromedriver has been removed as a JavaScript dependency (https://www.drupal.org/node/3319135). So, as suggested in point 3 in previous link, I've separately installed Chromedriver in my system (not as npm dependecy, but downloading it from https://sites.google.com/chromium.org/driver/downloads), and its binary is in /usr/bin/chromedriver.

I tried to play with /core/.env Drupal default settings as per Drupal instructions, but then if I run yarn test:nightwatch --env local in the node container I obtain the following error:

ChromeDriver cannot be found in the current project.

  1. You can either install chromedriver from NPM with: npm install chromedriver --save-dev
  2. or download it from https://sites.google.com/chromium.org/driver/downloads, extract the archive and set "webdriver.server_path" config option to point to the binary file.

So I'm trying point 2, but cannot figure out how to do the right settings.

Please help me, a step by step guide would be very appreciated, thank you.

MXTcomunica avatar Nov 10 '22 15:11 MXTcomunica