e2e-authoring

A set of rules for writing end-to-end tests with Cypress and Cucumber. End-to-end tests check a complete user flow through a running application, while Cucumber feature files describe those flows in readable text.

In plain words
What is it for?
It helps create or change Cypress tests, Cucumber scenarios, step definitions, page objects, and checks that the application is ready before an action.
Why use it?
It keeps test files, reusable actions, page objects, assertions, and waiting behavior consistent, reducing flaky tests and unnecessary full-suite runs.

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/nerds-odd-e/doughnut/e2e-authoring
Clone the repo
git clone --depth 1 https://github.com/nerds-odd-e/doughnut

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,726 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.02726
Opus 5 $0.00000 $0.01363
Sonnet 5 $0.00000 $0.00545
Haiku 4.5 $0.00000 $0.00273

Measured 2d ago against content hash d55f5058345a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

e2e-authoring 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 2d ago.

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.

.cursor/rules/e2e-authoring.mdc · 228 lines

How it starts

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

E2E Authoring Rules

Use this rule when writing or modifying E2E tests, Cypress/Cucumber feature files, step definitions, page objects, or E2E assertions. For OCR-specific canvas assertions, use e2e-ocr.mdc.

Environment Assumption

Assume the developer has already started services with pnpm sut, including backend auto-reload, frontend HMR, and Mountebank. Services automatically restart when code changes are made.

If services are not running, suggest starting pnpm sut in a separate terminal.

Cypress Origin

http://localhost:5173 is always the Cypress app origin through the local load balancer. CI vs pnpm sut, wait-on, NO_PROXY, and env vars are documented in docs/gcp/prod_env.md, Local dev / Cypress under section 6.

Run E2E Tests

Agents should default to pnpm cypress run --spec with one or more .feature paths tied to the changed capability. Add adjacent specs only when regression risk warrants it. Do not run bare pnpm cypress run, pnpm verify, or the whole suite unless the user explicitly asks for a full E2E run or the instructions require reproducing CI.

CURSOR_DEV=true nix develop -c pnpm cypress run --spec e2e_test/features/ai_generated_recall_questions/question_contest.feature

Important notes:

  • Do not use cypress run -- --spec; the empty -- causes the --spec parameter to be ignored.
  • The default tag filter is expose.tags in e2e_test/config/ci.ts, for example not @ignore. Override per run with --expose tags='...' (-x), not --env tags=... (ignored by @badeball/cypress-cucumber-preprocessor v27 on Cypress >= 15.17).
  • @skipOptimizationDueToKnownNecessarySlowness on a Scenario or Feature marks known-necessary slowness. Test-optimization profiles exclude it with --expose tags='not @ignore and not @skipOptimizationDueToKnownNecessarySlowness'. Normal CI/dev runs still execute these scenarios. Do not add this tag without developer review.
  • @focus and @only are local debugging aids only. Do not commit them; CI runs ./scripts/check_focus_tags.sh on .feature files to block @focus, and @only should be treated the same.
  • If any node in a feature file is tagged @focus or @only, @badeball/cypress-cucumber-preprocessor filters scenarios in that file to @focus or @only only.

Read the full file on GitHub · 228 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. 2d ago First seen · 228 lines · 0 tokens per session scan A d55f5058345a

Subscribe to this mod's changes

e2e-authoring is a cursor rule published in the GitHub repository nerds-odd-e/doughnut (49 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,726 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.