Drupal

Behat Mink: 09 - CLI Options Behat v2.5 Guide

 

Gherkin Filters

If you want to run only part of your suite, or some scenarios, you can do it with name or tags filters.

Tag filters supports three logical operators:

  • Tags separated by commas will be combined using the OR operation
  • Tags separated by && will be combined using the AND operation
  • Tags preceded by ~ will be excluded using the NOT operation

For example:

Behat Mink: 05 - regions in behat.yml

 

 

behat.yml

  • added region_map: footer: "#footer"
default:
  suites:
    default:
      contexts:
      - FeatureContext
      - Drupal\DrupalExtension\Context\DrupalContext
      - Drupal\DrupalExtension\Context\MinkContext
      - Drupal\DrupalExtension\Context\MessageContext
      - Drupal\DrupalExtension\Context\DrushContext
  extensions:
    Behat\MinkExtension:
      goutte: ~
      selenium2: ~
      base_url: http://unityconstruct.org/uc/
    Drupal\DrupalExtension:
      blackbox: ~
      region_map:
        footer: "#footer"

 

 

 

Behat Mink: 03 - First working

cmder session with passing results

  •  
T:\git\behatmink
λ bin\behat
Feature: Product basket
  In order to buy products
  As a customer
  I need to be able to put interesting products into a basket

  Rules:
  - VAT is 20%
  - Delivery for basket under $10 is $3
  - Delivery for basket over $10 is $2

  Scenario: Buying a single product under $10               # features\basket.feature:11
    Given there is a "Sith Lord Lightsaber", which costs $5 # FeatureContent::thereIsAWhichCosts()
    When I add the "Sith Lord Lightsaber" to the basket     # FeatureContent::iAddTheToTheBasket()
    Then I should have 1 product in the basket              # FeatureContent::iShouldHaveProductInTheBasket()
    And the overall basket price should be $9               # FeatureContent::theOverallBasketPriceShouldBe()

  Scenario: Buying a single product over $10                 # features\basket.feature:17
    Given there is a "Sith Lord Lightsaber", which costs $15 # Featu
Subscribe to Drupal