Skip to main content

Drupal steps

These steps only mean something on a Drupal site. DrupalContext composes all of them, on top of the web steps it inherits from WebContext. A trait's page gives each of its steps an example and lists the options and the prerequisites the trait declares.

STEPS.md holds these steps and the web steps on 1 page. It ships with the package, so an AI coding agent in your project can read it from vendor/.

NameTraitDescription
Batch APIDrupal\BatchTraitWait for Drupal's Batch API to finish.
BigPipeDrupal\BigPipeTraitWait for Drupal BigPipe placeholders to be replaced on JavaScript scenarios.
BlocksDrupal\BlockTraitManage Drupal blocks.
Caches and cronDrupal\CacheTraitInvalidate Drupal caches and run cron from within a scenario.
Config overridesDrupal\ConfigOverrideTraitDisable Drupal config overrides from settings.php during a scenario.
ConfigurationDrupal\ConfigTraitAssert and set stored Drupal configuration values with automatic revert.
ContentDrupal\ContentTraitManage Drupal content with workflow and moderation support.
Content blocksDrupal\ContentBlockTraitManage Drupal content blocks.
DraggableViewsDrupal\DraggableviewsTraitOrder items in the Drupal Draggable Views.
DrushDrupal\DrushTraitRun Drush commands and assert their output.
ECK entitiesDrupal\EckTraitManage Drupal ECK entities of an existing entity type and bundle.
EmailDrupal\EmailTraitTest Drupal email functionality with content verification.
EntitiesDrupal\EntityTraitCreate entities of a type that has no dedicated trait.
FilesDrupal\FileTraitManage Drupal file entities with upload and storage operations.
LanguagesDrupal\LanguageTraitCreate the languages a scenario needs.
MediaDrupal\MediaTraitManage Drupal media entities with type-specific field handling.
MenusDrupal\MenuTraitManage Drupal menus and menu links.
ModulesDrupal\ModuleTraitEnable and disable Drupal modules with automatic state restoration.
ParagraphsDrupal\ParagraphsTraitManage Drupal paragraphs entities with structured field data.
QueuesDrupal\QueueTraitManage and assert Drupal queue state.
RedirectsDrupal\RedirectTraitManage Drupal redirect entities provided by the contrib redirect module.
Search APIDrupal\SearchApiTraitRun Drupal Search API indexing and cron hooks.
State APIDrupal\StateTraitManage and assert Drupal State API values with automatic revert.
System timeDrupal\TimeTraitControl system time in tests using Drupal state overrides.
TaxonomyDrupal\TaxonomyTraitManage Drupal taxonomy terms with vocabulary organization.
TestmodeDrupal\TestmodeTraitConfigure Drupal Testmode module for controlled testing scenarios.
UsersDrupal\UserTraitManage Drupal users with role and permission assignments.
WatchdogDrupal\WatchdogTraitAssert Drupal does not trigger PHP errors during scenarios using Watchdog.
WebformsDrupal\WebformTraitManage Drupal webforms.