1.0.x-dev
1.0.9999999.9999999-dev https://github.com/dman-coders/drupal-more-extensionsExtended Drupal extensions for Behat
GPL-2.0+
The Requires
by Dan Morrison
test drupal web
Extended Drupal extensions for Behat
Extended Drupal extensions for Behat, (*1)
For setup instructions on getting testing for Drupal running, see the drupal-extension docs https://behat-drupal-extension.readthedocs.io/, (*2)
This set of 'Contexts' provides a few more sets of actions we can test., (*3)
To include these contexts in your project:, (*4)
Include this library in your behat test project composer.json, (*5)
{ "require": { /* Other stuff */ "dman-coders/drupal-more-extensions": "~1.0@dev" }, "repositories": [ { "type": "vcs", "url": "git@github.com:jhedstrom/drupalextension.git" } ], }, (*6)
And run composer update
., (*7)
Include the DrupalMoreExtensions Context(s) in your behat.yml, (*8)
default: suites: default: contexts: - FeatureContext - Drupal\DrupalExtension\Context\DrupalContext /* Other Stuff */ - Drupal\DrupalMoreExtensions\Context\BrowserContext - Drupal\DrupalMoreExtensions\Context\ScreenshotContext: params: path: 'screenshots' timestamped: false, (*9)
And you should see the new commands become available., (*10)
The actions listed here may be incomplete. Run:
behat -dl
to list the real state of available definitions.
behat -di
to show the associated action help., (*11)
Drupal\DrupalMoreExtensions\Context\ScreenshotContext
And some runtime debug additions:, (*12)
Drupal\DrupalMoreExtensions\Context\BrowserContext
Drupal\DrupalMoreExtensions\Context\DrupalLoginContext
To include these new steps and actions,, (*13)
In behat.yml, include:, (*14)
default: suites: default: contexts: - Drupal\DrupalMoreExtensions\Context\DrupalLoginContext
If you want to use the "I am logged in as user :name" action, pre-configure some users as below. This will NOT create these users, use this to leverage existing accounts., (*15)
... - Drupal\DrupalMoreExtensions\Context\DrupalLoginContext: users: admin: name: admin pass: adminpass member: name: "tester" pass: "tester"
Extended Drupal extensions for Behat
GPL-2.0+
test drupal web