agentleFS
SkillMedevSkillMedev/qa-test-automation/skills/e2e-scenario-author/SKILL.md

e2e-scenario-author

Skill0 starsChanged 39 days agoMITView on GitHub

Converts an acceptance criterion or user story into one maintainable Playwright or Cypress end-to-end test that reads like the journey it covers. Use when turning a Given/When/Then acceptance criterion or user story into a browser test, when asked to "write an E2E test for this AC", or when a feature's critical journey (login, checkout, signup) needs a single automated scenario. Do NOT use when writing general Playwright tests, configuring the runner, or fixing existing test flakiness - use playwright-testing or flaky-test-detangler instead.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. ch4570/vulpora★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository8 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Confirm isolation: Verify the test shares no account or data with any other scenario and can run in parallel.

    line 18
  2. Very specific:

    Use page.waitForTimeout, cy.wait(3000), or any fixed sleep - wait on the actual signal.

    line 33
  3. Very specific:

    Use CSS/XPath selectors tied to DOM structure, nth-child chains, styling classes, or generated ids.

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

E2E Scenario Author

Turn one acceptance criterion into one browser test that reads like the user story it came from and survives every refactor that does not change user-visible behavior.

Workflow

  1. Pin the journey. Take the single acceptance criterion and map its Given/When/Then to setup, action, assertion. One scenario covers one journey (e.g. "a returning user checks out a cart with a coupon"). If the AC implies several behaviors, write several tests. Name each test after the behavior, not the page.
  2. Seed state via the back door. In setup, create the test's own data through an API request or a test-only route - never drive the UI through registration or other flows just to reach the start state. Back-door seeding typically cuts setup from 30+ seconds of UI clicking to under 2 seconds. Reset auth and storage so the test owns a fresh, isolated account.
  3. Drive the action through a page object. Wrap each page or component in a page object exposing intent-level methods (loginPage.signIn(user)) so selectors live in one place and the test body speaks the domain. In Playwright, inject the authenticated page and shared setup via fixtures; in Cypress, use custom commands. The test body contains no raw selectors.
  4. Select by role and accessible name. Inside the page object, use getByRole('button', { name: 'Place order' }), getByLabel, getByText - selectors that mirror how a user finds elements and double as accessibility checks. When a stable hook is genuinely unavoidable, add an explicit data-testid.
  5. Assert on user-visible state, waiting on signals. Assert the outcome the user would see. Rely on auto-waiting: Playwright web-first expect assertions and Cypress commands retry until the condition holds. Wait for a real signal - a network response, a URL change, a visible element - never a fixed delay. Treat the runner's default timeout (Playwright's 30s) as a ceiling for pathological slowness, not a target the test should ever approach.
  6. Confirm isolation. Verify the test shares no account or data with any other scenario and can run in parallel.

Deliverable

Produce one runnable test file containing the scenario named after the behavior it covers, the page objects and fixtures (or custom commands) it introduces, and the back-door seeding helper it relies on - plus a short comment or note mapping each Given/When/Then clause of the acceptance criterion to the corresponding block of the test.

Quality bar

  • The test passes against the real app and fails only when the journey it names is actually broken.
  • A reviewer can read the test body top-to-bottom as the user story, with zero raw selectors visible.
  • The test runs in parallel with the rest of the suite with no shared account, fixture data, or ordering dependency.
  • A single scenario finishes in under ~2 minutes; longer almost always means it covers more than one journey.

Do NOT

  • Use page.waitForTimeout, cy.wait(3000), or any fixed sleep - wait on the actual signal.
  • Use CSS/XPath selectors tied to DOM structure, nth-child chains, styling classes, or generated ids.
  • Stuff assertions about unrelated features into one scenario - that test is slow, fragile, and uninformative on failure.
  • Push edge cases, validation rules, and error states into E2E - those belong in unit/integration tests where they run faster and pinpoint failures. Reserve E2E for a handful of critical, cross-cutting journeys: most products need 5-20 E2E scenarios, not hundreds.
  • Drive multi-step UI setup to reach the start state - seed it through the back door instead.
  • Share an account or rely on another test's leftover data.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.