Behat
Behat.phar Mink.phar GitHub

TagRewriterExtension

The TagRewriter extension allows tags to be replaced, removed, or augmented at runtime.

Installation

This extension requires:

  • Behat 2.4+
  • Mink 1.4+

Through Composer

  1. Set dependencies in your composer.json:
{
    "require": {
        ...
        "vipsoft/tag-rewriter-extension": "*"
    }
}
  1. Install/update your vendors:
$ curl http://getcomposer.org/installer | php
$ php composer.phar install

Through PHAR

Download the .phar archive:

Configuration

Activate extension in your behat.yml and define your tags:

# behat.yml
default:
  # ...
  extensions:
    VIPSoft\TagRewriterExtension\Extension:
      tags: ~

Settings

  • To replace a tag, simply don’t include the original tag in the set of new tags:
tags:
  # replace @xbrowser with @winxpie @firefox @chrome
  xbrowser: winxpie firefox chrome
  • To augment a tag, include the original tag in the set of new tags:
tags:
  # augment @javascript with @winxpie @firefox @chrome
  javascript: javascript winxpie firefox chrome
  • To remove a tag, use null:
tags:
  # remove @javascript
  javascript: ~

Source

Github

Contributors