2017 © Pedro Peláez
 

library behat-transformation-context

Behat package to transform human readable labels to selectors or page paths.

image

openeuropa/behat-transformation-context

Behat package to transform human readable labels to selectors or page paths.

  • Friday, July 20, 2018
  • by ademarco
  • Repository
  • 8 Watchers
  • 0 Stars
  • 536 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Behat Transformation Context

Build Status Packagist, (*1)

This package provides a Behat context allowing to transform human readable labels to selectors or page paths. Such functionality improves the readability of the Behat tests., (*2)

Installation

$ composer require openeuropa/behat-transformation-context

Configuration

Add the extension and context to your test suite in behat.yml:, (*3)

default:
  suites:
    default:
      contexts:
        - OpenEuropa\Behat\TransformationContext:
            elements:
              header: 'div#header'
            pages:
              home: 'index.php'

Usage

We can use steps such as these:, (*4)

    Given I point to *the home page*
    Then previous step targets "*index.php*"
    When I point to the "*header*" element
    Then previous step targets "*div#header*"

Development

Running tests locally:, (*5)

$ git clone git@github.com:openeuropa/behat-transformation-context.git
$ cd behat-transformation-context
$ composer install
$ ./vendor/bin/behat

Using Docker Compose

The setup procedure described above can be sensitively simplified by using Docker Compose., (*6)

Requirements:, (*7)

Run:, (*8)

$ docker-compose up -d

Then:, (*9)

$ docker-compose exec web composer install

GrumPHP tasks will be ran at every commit, if you with to run them without performing a commit use the following command:, (*10)

$ ./vendor/bin/grumphp run

If you want to simulate a commit message use:, (*11)

$ ./vendor/bin/grumphp git:pre-commit

Step debugging

To enable step debugging from the command line, pass the XDEBUG_SESSION environment variable with any value to the container:, (*12)

docker-compose exec -e XDEBUG_SESSION=1 web <your command>

Please note that, starting from XDebug 3, a connection error message will be outputted in the console if the variable is set but your client is not listening for debugging connections. The error message will cause false negatives for PHPUnit tests., (*13)

To initiate step debugging from the browser, set the correct cookie using a browser extension or a bookmarklet like the ones generated at https://www.jetbrains.com/phpstorm/marklets/., (*14)

The Versions

20/07 2018

dev-master

9999999-dev https://github.com/openeuropa/behat-transformation-context

Behat package to transform human readable labels to selectors or page paths.

  Sources   Download

EUPL-1.2

The Requires

 

The Development Requires

test behat transform

19/07 2018

dev-OPENEUROPA-721

dev-OPENEUROPA-721 https://github.com/openeuropa/behat-transformation-context

Behat package to transform human readable labels to selectors or page paths.

  Sources   Download

EUPL-1.2

The Requires

 

The Development Requires

test behat transform

03/07 2018

0.1.0

0.1.0.0 https://github.com/openeuropa/behat-transformation-context

Behat package to transform human readable labels to selectors or page paths.

  Sources   Download

EUPL-1.2

The Requires

 

The Development Requires

test behat transform