Download the PHP package digitalist-se/behat-tools without Composer
On this page you can find all versions of the php package digitalist-se/behat-tools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download digitalist-se/behat-tools
More information about digitalist-se/behat-tools
Files in digitalist-se/behat-tools
Informations about the package behat-tools
behat-tools
Behat related tools
Set up
Add this to the repositories
section of your composer.json
Execute:
Add to your behat.yml
:
Add more Contexts depending on your needs using the same structure.
Entity Context
You can set the format of the dates for each field in the behat.yml like this:
In that case you could use relative date in php format like:
Entity fields support
Entity fields are supported like in the following example: (<field_type>) <field_name>.<field_property>
- Field with simple structure (e.g.: boolean, textfield, etc.):
field_archived.value
- Field type with more complex structure:
(daterange) field_date.value
NOTE: Only
daterange
type is supported at the moment. If you need to support more complex fields you can add processing toEntityContext::processEntityFields
.
Example using entity fields and properties
Screenshot Context
The ScreenshotContext
needs display sizes declared in your behat.yml
under the suite settings key screenshot_context
. Define a desktop size and any number of named mobile devices to ensure predictable, comparable screenshots.
Recommended configuration:
Notes:
- One desktop screenshot is always taken using
desktop_size
(defaults to 1920x1080 if not set). - One additional screenshot is taken per entry in
mobile_devices
, saved under themobile_subfolder
using the device name in the filename. - If no
mobile_devices
are configured, only the desktop screenshot is produced.
Legacy configuration (backwards compatibility):
When using display_sizes
, the desktop size is read from display_sizes.desktop
, and a single mobile device named mobile
is inferred from display_sizes.mobile
. Other keys (e.g. tablet
) are ignored by the current implementation. Prefer the recommended desktop_size
+ mobile_devices
format for multiple devices.