forked from drud/quicksprint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds optional/examples that a user can add to get Nightwatch/Phpunit …
…testing drud#195
- Loading branch information
1 parent
8dcd10a
commit 5ca5e9c
Showing
5 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
## Description: Run Nightwatch | ||
## Usage: nightwatch [flags] [args] | ||
## Example: "ddev nightwatch" or "ddev nightwatch --tag core" | ||
|
||
yarn --cwd /var/www/html/core test:nightwatch $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
## Description: Run PHPUnit | ||
## Usage: phpunit [flags] [args] | ||
## Example: "ddev phpunit --group big_pipe" or "ddev phpunit core/modules/action" | ||
|
||
php ./vendor/bin/phpunit -c core/phpunit.xml.dist $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
# Adds Chromedriver and Drupal PHPUnit test environment variables for running tests. | ||
version: '3.6' | ||
services: | ||
chromedriver: | ||
image: drupalci/chromedriver:production | ||
container_name: ddev-${DDEV_SITENAME}-chromedriver | ||
labels: | ||
com.ddev.site-name: ${DDEV_SITENAME} | ||
com.ddev.approot: $DDEV_APPROOT | ||
|
||
web: | ||
links: | ||
- chromedriver:$DDEV_HOSTNAME | ||
environment: | ||
# PHPUnit | ||
SYMFONY_DEPRECATIONS_HELPER: weak | ||
SIMPLETEST_DB: mysql://db:db@db:3306/db | ||
SIMPLETEST_BASE_URL: http://web | ||
BROWSERTEST_OUTPUT_DIRECTORY: /var/www/html/private/browsertest_output | ||
BROWSERTEST_OUTPUT_BASE_URL: $DDEV_PRIMARY_URL | ||
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless", "--no-sandbox"]}}, "http://chromedriver:9515"]' | ||
|
||
# Nightwatch | ||
DRUPAL_TEST_BASE_URL: http://web | ||
DRUPAL_TEST_DB_URL: mysql://db:db@db:3306/db | ||
DRUPAL_TEST_WEBDRIVER_HOSTNAME: chromedriver | ||
DRUPAL_TEST_WEBDRIVER_PORT: 9515 | ||
DRUPAL_TEST_CHROMEDRIVER_AUTOSTART: 'false' | ||
DRUPAL_TEST_WEBDRIVER_CHROME_ARGS: "--disable-gpu --headless --no-sandbox" | ||
DRUPAL_NIGHTWATCH_OUTPUT: reports/nightwatch | ||
DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES: node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters