palantirnet / palantir-behat-extension

Additional step definitions for testing Drupal sites using Behat.
1 stars 4 forks source link

Palantir Behat Drupal Extension

This package is no longer maintained. To upgrade an existing site, you can copy the contexts you use from src/Palantirnet/PalantirBehatExtension/Context/ into your project.

The Palantir Behat Drupal Extension provides additional step definitions for testing Drupal sites using Behat, Mink Extension.

Drupal 8

Drupal 8 is supported using the drupal8 branch, but all of the available steps and methods currently throw a NotUpdatedException. Please update them as you need them for your projects!

Drupal 7

Drupal 7 is supported using the master branch.

What can I do with this?

Extra step syntax

Disable module functionality during tests

Extend for your project's needs

How do I add this to my project?

If you are already using the Drupal\DrupalExtension Behat extension, it is very easy to add these contexts--and if not, go set that up before attempting to use these custom contexts.

First, add this package to your composer.json file:

    "repositories": [
        {
            "type": "vcs",
            "url": "git@github.com:palantirnet/palantir-behat-extension.git"
        }
    ],
    "require-dev": {
        "palantirnet/palantir-behat-extension": "dev-drupal8"
    },

Then, add the specific contexts you want to use to your project's behat.yml file:

default:
  suites:
    default:
      contexts:
        - Palantirnet\PalantirBehatExtension\Context\DrupalAutoNodetitleContext
        - Palantirnet\PalantirBehatExtension\Context\DrupalCommentContext
        - Palantirnet\PalantirBehatExtension\Context\DrupalOrganicGroupsContext
        - Palantirnet\PalantirBehatExtension\Context\DrupalSetupContext
        - Palantirnet\PalantirBehatExtension\Context\DrupalWorkbenchModerationContext
        - Palantirnet\PalantirBehatExtension\Context\EntityDataContext
        - Palantirnet\PalantirBehatExtension\Context\MarkupContext
        - Palantirnet\PalantirBehatExtension\Context\NodeContext
        - Palantirnet\PalantirBehatExtension\Context\SharedDrupalContext

@copyright (c) Copyright 2015 Palantir.net, Inc.