Git Product home page Git Product logo

ddev-selenium-standalone-chrome's Introduction

tests project is maintained

Introduction

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.

Install/Update

  1. ddev get drud/ddev-selenium-standalone-chrome
  2. Optional. Update the provided .ddev/config.selenium-standalone-chrome.yaml as you see fit(and remove the #ddev-generated line). You can also just override lines in your .ddev/config.yaml
  3. Optional. Check config.selenium-standalone-chrome.yaml and docker-compose.selenium-chrome.yaml into your source control.
  4. Update by re-running ddev get drud/ddev-selenium-standalone-chrome.

Use

  • Your project is now ready to run FunctionalJavascript and Nightwatch tests from Drupal core, or 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]:7900 (password: secret) to watch tests run (neat!).

Contribute

Maintainer

ddev-selenium-standalone-chrome's People

Contributors

rfay avatar tyler36 avatar weitzman avatar

Forkers

bserem

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.