behat-steps

A reference for Behat testing steps, where Behat is a tool for describing browser behavior in readable scenarios, including generic and Drupal-specific steps.

In plain words
What is it for?
Use it to look up traits and steps for browser interactions, downloads, dates, paths, HTTP responses, AJAX waits, and Drupal blocks or content.
Why use it?
It helps you find existing test steps instead of writing new ones for common actions such as checking links, navigating pages, handling cookies, or managing Drupal content.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/ivangrynenko/cursorrules/behat-steps
Clone the repo
git clone --depth 1 https://github.com/ivangrynenko/cursorrules

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 15,618 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.15618
Opus 5 $0.00000 $0.07809
Sonnet 5 $0.00000 $0.03124
Haiku 4.5 $0.00000 $0.01562

Measured yesterday against content hash 5e59e00977ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

behat-steps scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.cursor/rules/behat-steps.mdc · 2,776 lines

How it starts

The opening of the file, as written. The whole thing — 2,776 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Behat Steps - Claude Memory

Available steps

Index of Generic steps

Class Description
CookieTrait Verify and inspect browser cookies.
DateTrait Convert relative date expressions into timestamps or formatted dates.
ElementTrait Interact with HTML elements using CSS selectors and DOM attributes.
FileDownloadTrait Test file download functionality with content verification.
KeyboardTrait Simulate keyboard interactions in Drupal browser testing.
LinkTrait Verify link elements with attribute and content assertions.
PathTrait Navigate and verify paths with URL validation.
ResponseTrait Verify HTTP responses with status code and header checks.
WaitTrait Wait for a period of time or for AJAX to finish.

Index of Drupal steps

Class Description
Drupal\BigPipeTrait Bypass Drupal BigPipe when rendering pages.
Drupal\BlockTrait Manage Drupal blocks.
Drupal\ContentBlockTrait Manage Drupal content blocks.
Drupal\ContentTrait Manage Drupal content with workflow and moderation support.
Drupal\DraggableviewsTrait Order items in the Drupal Draggable Views.
Drupal\EckTrait Manage Drupal ECK entities with custom type and bundle creation.
Drupal\EmailTrait Test Drupal email functionality with content verification.
Drupal\FieldTrait Manipulate Drupal form fields and verify widget functionality.
Drupal\FileTrait Manage Drupal file entities with upload and storage operations.
Drupal\MediaTrait Manage Drupal media entities with type-specific field handling.
Drupal\MenuTrait Manage Drupal menu systems and menu link rendering.
Drupal\MetatagTrait Assert <meta> tags in page markup.
Drupal\OverrideTrait Override Drupal Extension behaviors.
Drupal\ParagraphsTrait Manage Drupal paragraphs entities with structured field data.
Drupal\SearchApiTrait Assert Drupal Search API with index and query operations.
Drupal\TaxonomyTrait Manage Drupal taxonomy terms with vocabulary organization.
Drupal\TestmodeTrait Configure Drupal Testmode module for controlled testing scenarios.
Drupal\UserTrait Manage Drupal users with role and permission assignments.
Drupal\WatchdogTrait Assert Drupal does not trigger PHP errors during scenarios using Watchdog.

Read the full file on GitHub · 2,776 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 2,776 lines · 15,618 tokens per session scan A 5e59e00977ad

Subscribe to this mod's changes

behat-steps is a cursor rule published in the GitHub repository ivangrynenko/cursorrules (87 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 15,618 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.