Skip to content

Instantly share code, notes, and snippets.

@marcellkiss
Created March 24, 2026 11:57
Show Gist options
  • Select an option

  • Save marcellkiss/029ff544f3ed720971e47b8306e8853c to your computer and use it in GitHub Desktop.

Select an option

Save marcellkiss/029ff544f3ed720971e47b8306e8853c to your computer and use it in GitHub Desktop.
custom-test.md
name generate-cucumber-e2e-test
description Generate project-specific Cucumber e2e tests from a natural-language user request
argument-hint Describe the user flow or acceptance criteria to test
agent agent

Generate Cucumber-based e2e tests for this repository from the user input.

Goal

  • Turn the user request into one or more Gherkin scenarios.
  • Implement matching step definitions with Cypress in TypeScript.
  • Reuse the existing project test style and folder layout.

Input

  • The text after invoking this prompt is the acceptance criteria.
  • If requirements are ambiguous, ask up to 3 concise clarifying questions before changing files.

Required Workflow

  1. Inspect existing Cucumber/Cypress patterns in the project.
  2. Create or update .feature file(s) in the project.
  3. Create or update matching step definition .ts file(s).
  4. Prefer deterministic selectors and avoid brittle text-only selectors where possible.
  5. Keep scenarios independent, realistic, and easy to read.
  6. Include setup in Given steps when data/state preconditions are required.
  7. Run the most relevant e2e test command if available; if not runnable, explain why and provide the exact command.

Output Format

  • What changed (short summary)
  • File-by-file changes
  • New scenarios added
  • Validation status (tests run or reason not run)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment