Skip to content
Snippets Groups Projects
Commit 71a2b9e0 authored by Kumiko Ono's avatar Kumiko Ono Committed by Yas Naoi
Browse files

Issue #3224987 by kumikoono, yas: Set up behat to cloud module for BDD

parent 54694735
No related branches found
No related tags found
No related merge requests found
......@@ -20,13 +20,14 @@
"drupal-composer/drupal-security-advisories": "dev-8.x-v2",
"drupal/admin_toolbar": "*",
"drupal/coder": "*",
"drupal/drupal-extension": "*",
"drupal/memcache": "^2",
"drupal/queue_ui": "*",
"drush/drush": "*",
"kint-php/kint": "*",
"phpspec/prophecy-phpunit": "*",
"phpunit/phpunit": "*",
"symfony/phpunit-bridge": "*"
"symfony/phpunit-bridge": "*",
},
"extra": {
"drush": {
......
default:
suites:
default:
# See https://behat-drupal-extension.readthedocs.io/en/v4.0.1/contexts.html
contexts:
- FeatureContext
# Provides step-definitions for creating users, terms, and nodes.
- Drupal\DrupalExtension\Context\DrupalContext
# Builds on top of the Mink Extension and adds steps specific to regions
# and forms.
- Drupal\DrupalExtension\Context\MinkContext
# Step-definitions that are specific to Drupal messages that get
# displayed (notice, warning, and error).
- Drupal\DrupalExtension\Context\MessageContext
# Allows steps to directly call drush commands.
# - Drupal\DrupalExtension\Context\DrushContext
# - RawDrupalContext
# - MarkupContext
# - RandomContext
# - BatchContext
# Note: You can set here or $BEHAT_PARAMS.
extensions:
Drupal\MinkExtension:
goutte: ~
selenium2: ~
# Uncomment or set to $BEHAT_PARAMS (recommended).
# When drupal api_driver is used below, this base_url should be the same
# server where the tests run.
# base_url: http://localhost
Drupal\DrupalExtension:
# the api_driver will be used for scenarios tagged @api.
# blackbox, drush, or drupal
# blackbox driver assumes no privileged access to the site.
# blackbox: ~
# drupal api driver: limitation is that the tests must run on the
# same server as the Drupal site set by the base_url above.
api_driver: 'drupal'
drush:
alias: 'local'
#drupal:
# Uncomment or set to $BEHAT_PARAMS (recommended).
# drupal_root: '/var/www/html/web'
region_map:
nav_bar: ".navbar-collapse"
footer: ".footer"
selectors:
message_selector: '.messages'
error_message_selector: '.messages.messages--error'
success_message_selector: '.messages.messages--status'
warning_message_selector: '.messages.messages--warning'
<?php
use Drupal\DrupalExtension\Context\RawDrupalContext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
use Behat\Behat\Tester\Exception\PendingException;
/**
* Defines application features from the specific context.
*/
class FeatureContext extends RawDrupalContext {
/**
* Initializes context.
*
* Every scenario gets its own context instance.
* You can also pass arbitrary arguments to the
* context constructor through behat.yml.
*/
public function __construct() {
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment