Webforms
DrevOps\BehatSteps\Steps\Drupal\WebformTrait - Source, Example, Helpers
Manage Drupal webforms.
- Delete webforms matching a given title for test isolation.
- Clone webform templates into new webforms for scenario setup.
- Cloned webforms are automatically removed at the end of the scenario.
Prerequisites
| Prerequisite | Capability |
|---|---|
| A backend in the scenario's list provides "ConfigEntityCapabilityInterface" | ConfigEntityCapabilityInterface |
| The "webform" module from the "drupal/webform" package is enabled | ModuleCapabilityInterface |
Steps
@Given the webform :title does not exist
Remove all webforms with a title containing the given string
Given the webform "Test form" does not exist
@Given the webform :title has been created from the template :template
Clone a webform template into a new webform with the given title
Given the webform "My contact form" has been created from the template "Contact"