From d457abfa5959724c63c84d5375e88757a4b0d03c Mon Sep 17 00:00:00 2001 From: Bec White Date: Tue, 20 Oct 2015 15:42:35 -0500 Subject: [PATCH] Update the README. --- README.md | 13 ++++++++++++- features/node.feature | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e418e02..4c4b7a9 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,18 @@ The Palantir Behat Drupal Extension provides additional step definitions for testing Drupal sites using [Behat](http://behat.org), [Mink Extension](https://github.com/Behat/MinkExtension). -## Usage + +## What can I do with this? + +* Add `Palantirnet\PalantirBehatExtension\Context\NodeContext` to your `behat.yml` for extra steps for general Drupal tasks like viewing and editing nodes by title +* Extend `Palantirnet\PalantirBehatExtension\Context\MarkupContext` in your project and use the `assertRegionElementText` method to encapsulate complex markup in a custom context rather than in the Gherkin acceptance criteria +* Add `Palantirnet\PalantirBehatExtension\Context\DrupalCommentContext` to your `behat.yml` for extra steps to test commenting +* Add `Palantirnet\PalantirBehatExtension\Context\DrupalOrganicGroupsContext` to your `behat.yml` for extra steps to test access to Organic Groups +* Add `Palantirnet\PalantirBehatExtension\Context\EntityDataContext` to your `behat.yml` for extra steps to test field data and properties on nodes, terms, and users directly, without relying on output (... or write a simpletest...) +* Add `Palantirnet\PalantirBehatExtension\Context\DrupalAutoNodetitleContext` to your `behat.yml` and tag scenarios with `@disableAutoNodetitle` to bypass automatic title generation; sometimes this is required in order to have predictable test content +* Add `Palantirnet\PalantirBehatExtension\Context\DrupalWorkbenchModerationContext` to your `behat.yml` and tag scenarios with `@disableWorkbenchModeration` to bypass moderation + +## 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. diff --git a/features/node.feature b/features/node.feature index 63b6157..a4ccf98 100644 --- a/features/node.feature +++ b/features/node.feature @@ -9,6 +9,7 @@ Feature: Some Example Tests When I view the "page" content "My Test Page" Then I should get a "200" HTTP response + @disableWorkbenchModeration @disableAutoNodetitle Scenario: Verify I can view and edit a node Given a "page" with the title "My Test Page" And I am logged in as a user with the "bypass node access" permission