This module provides a media entity for storing Gherkin scripts directly within your Drupal site. It includes a field type, widget, and formatter for managing these scripts.
Gherkin Script adds a Gherkin media source to Drupal, so you can keep Gherkin/Cucumber feature scripts as reusable media items and edit them with syntax highlighting in the Ace Editor.
Features
- A Media source plugin for Gherkin scripts.
- A ready-to-use Feature media type with a Gherkin script field, including form and view displays for the Media Library.
- A dedicated Gherkin text format and editor configuration powered by Ace Editor.
- A vertically resizable editor area for longer scripts.
Requirements
- Drupal
^11.4 || ^12 - Core Media and Text Editor modules
- Ace Editor
^2.0.5, which requires the Ace library itself through vardot/ace.
No asset-packagist, npm-asset repositories or custom installer-paths are needed — Composer places the Ace library at web/libraries/ace through the standard type:drupal-library installer path.
Installation
ddev composer require drupal/gherkin
ddev drush en gherkin -y
For further information, see Installing Drupal Modules.
Configuration
After you enable the module, the Feature media type and the Gherkin text format are available. Adjust them under Structure » Media types and Configuration » Content authoring » Text formats and editors.
Usage
Add a Feature media item (Content » Media » Add media » Feature), or pick one from the Media Library, and write your Gherkin scenarios in the Ace-powered editor.
Ask your assistant about Gherkin Script
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
- Ace Code Editor
- editor Drupal core
- media Drupal core
Required by
1 tracked project depends on this one
- Cucumber Core 69 sites