There is three different ways based on your development environment.
If you want a database dump, here is one: https://drupalnorge.no/sanitized.db
-
Clone this repository. For example with:
git clone git@github.com:drupalnorge/drupalnorge-social.git
-
cd
into the repository root. Install the composer dependencies. For example with:composer install
-
Install drupal. You can do this however you want. One way is to use drush:
drush site-install --db-url=mysql://USER:PASS@HOST/DATABASE
We have a ready configuration file for DDEV development environment for you. However, you can modify the DDEV-configuration on .ddev/.config.yaml
-file.
git clone git@github.com:drupalnorge/drupalnorge-social.git dnorge
cd dnorge
ddev auth ssh && ddev start && ddev composer install
- Database:
drush sql-sync @prod @self -y
or use the sanitized database above. - Files:
drush rsync @prod:%files @self:%files -y
Or you can spin up as a new one by Drush: ddev drush site-install -y
Refer to this guide: https://www.drupal.org/docs/8/distributions/open-social/installing-and-updating
- Install chromedriver with npm. If you do not have npm, install it together with nodejs. To install chromedriver inside of the project root, just run this command:
npm install chromedriver
- Create a file called behat.yml in the project root. It should contain the following:
imports:
# This tells behat to use all defaults, except the ones we override.
- 'behat.yml.dist'
default:
extensions:
Behat\MinkExtension:
# Set this to whatever your project is available at, locally.
base_url: http://drupalnorge.localhost/
selenium2:
wd_host: http://localhost:8643/wd/hub
If you also want to watch the tests run on your computer, you can uncomment the line about headless in behat.yml.dist, like so (do not commit this change):
- - "--headless"
+ #- "--headless"
Now we want to start chromedriver. You can do this in one terminal window, and start the tests in another:
./node_modules/.bin/chromedriver --port=8643 --url-base=wd/hub
Next step is to run the tests. In another terminal window, run the following command, in the project root:
composer test