Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
weitzman committed Nov 9, 2022
1 parent 00516d9 commit 02f1f5b
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
[![tests](https://github.com/weitzman/ddev-selenium-standalone-chrome/actions/workflows/tests.yml/badge.svg)](https://github.com/drud/ddev-addon-template/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2022.svg)

## Install
## Introduction

In ddev v1.19+, run `ddev get weitzman/ddev-selenium-standalone-chrome` to fetch this service into your local DDEV installation. You may then check it into your source control if desired.

This service can be used with any project type. The examples below are Drupal-specific. Contributions for docs and tests that show this service working with other project types are appreciated.

## Use

- Your project is now ready to run FunctionalJavascript and Nightwatch tests from Drupal core, or [Drupal Test Traits](https://gitlab.com/weitzman/drupal-test-traits) (DTT). All these types are tested in this repo.
- Your project is now ready to run FunctionalJavascript and [Nightwatch](https://www.drupal.org/docs/automated-testing/javascript-testing-using-nightwatch) tests from Drupal core, or [Drupal Test Traits](https://gitlab.com/weitzman/drupal-test-traits) (DTT). All these types are tested in this repo. Some examples to try:
- FunctionalJavascript:
- Ensure you have the `drupal/core-dev` Composer package or equivalent.
- `ddev exec -d /var/www/html/web "../vendor/bin/phpunit -v -c ./core/phpunit.xml.dist ./core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php"`
- Nightwatch
- `ddev exec -d /var/www/html/web/core yarn install` (do this once)
- `ddev exec -d /var/www/html/web/core touch .env` ((do this once))
- `ddev exec -d /var/www/html/web/core yarn test:nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js`
- Drupal Test Traits
- Ensure you have a working site that has the `weitzman/drupal-test-traits` Composer package.
- `ddev exec -d /var/www/html/web "../vendor/bin/phpunit --bootstrap=../vendor/weitzman/drupal-test-traits/src/bootstrap-fast.php --printer '\Drupal\Tests\Listeners\HtmlOutputPrinter' ../vendor/weitzman/drupal-test-traits/tests/ExampleSelenium2DriverTest.php"`
- On your host, browse to https://[DDEV SITE URL]:7910 (password: `secret`) to watch tests run (neat!).

## Contribute
Expand Down

0 comments on commit 02f1f5b

Please sign in to comment.