Skip to content

Commit 5d983e4

Browse files
authored
Add DRUPAL_TEST_WEBDRIVER_CHROME_ARGS for Nightwatch tests with login (#27)
* Test Drupal login * Add DRUPAL_TEST_WEBDRIVER_CHROME_ARGS For Nightwatch tests that log in to Drupal. --------- Co-authored-by: Cottser <[email protected]>
1 parent 21a688c commit 5d983e4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

config.selenium-standalone-chrome.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ web_environment:
1919
- DRUPAL_TEST_WEBDRIVER_HOSTNAME=selenium-chrome
2020
- DRUPAL_TEST_WEBDRIVER_PORT=4444
2121
- DRUPAL_TEST_WEBDRIVER_PATH_PREFIX=/wd/hub
22+
- DRUPAL_TEST_WEBDRIVER_CHROME_ARGS=--disable-gpu --headless --no-sandbox --disable-dev-shm-usage
2223
- DRUPAL_TEST_CHROMEDRIVER_AUTOSTART=false
2324
- DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=../
2425
- DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES=node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest

tests/test.bats

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ teardown() {
3535
ddev exec -d /var/www/html/web/core yarn install
3636
ddev exec -d /var/www/html/web/core touch .env
3737
ddev exec -d /var/www/html/web/core yarn test:nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js
38+
echo "Run a Nightwatch test that logs into Drupal." >&3
39+
ddev exec -d /var/www/html/web/core yarn test:nightwatch tests/Drupal/Nightwatch/Tests/loginTest.js
3840
echo "Install Drupal and run a DTT test." >&3
3941
ddev exec -d /var/www/html/web "../vendor/bin/drush si -y --account-name=admin --account-pass=password standard"
4042
ddev exec -d /var/www/html/web "../vendor/bin/phpunit --log-junit dtt.junit.xml --bootstrap=../vendor/weitzman/drupal-test-traits/src/bootstrap-fast.php --printer '\Drupal\Tests\Listeners\HtmlOutputPrinter' ../vendor/weitzman/drupal-test-traits/tests/ExampleSelenium2DriverTest.php"

0 commit comments

Comments
 (0)