agentleFS
omidnwomidnw/my-skills/skills/e2e-test-authoring/SKILL.md

e2e-test-authoring

Skill0 starsChanged 10 days agoMITView on GitHub

Use when authoring or changing browser E2E tests and no project-specific authoring skill owns the task. Write one observable outcome per test, reproducible manual scenarios, typed helpers, accessible selectors and disposable fixtures.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the project handbook and runner config.

    line 15
  2. Distinctive:

    Search existing specs and helpers.

    line 18
  3. Distinctive:

    Put the spec under its correct feature/role project.

    line 19
  4. Very specific:

    Use the project's ID/tag registry.

    line 21
  5. Very specific:

    Prefer getByRole and getByLabel, with exact names and scoped groups where repeated labels exist.

    line 23
  6. Distinctive:

    Keep specs as scenarios plus business assertions, preferably inline for single-use locators.

    line 24
  7. Distinctive:

    Use observable waits and retrying assertions, not fixed sleeps.

    line 25
  8. Very specific:

    Run the affected spec and applicable type/ID/document checks.

    line 26
  9. Very specific:

    No conditional visibility assertions or .first() to hide ambiguity.

    line 29
  10. Distinctive:

    No redundant comments; intent comes from titles, manual scenario and assertions.

    line 30
  11. Distinctive:

    Do not weaken tests for product bugs.

    line 31
  12. Distinctive:

    Do not start seeds, teardown or remote mutation runs until environment and data ownership are verified.

    line 32

≈ “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 test authoring

Purpose

Produce automation that proves user behavior and a manual scenario a tester can reproduce without prior context.

When to use

Browser E2E authoring or converting manual scenarios to automation. If a project authoring skill exists, read and follow it instead; these are fallback defaults.

Preconditions

Read the project handbook and runner config; know folder-to-project/auth/environment mapping. Verify actual routes, roles, labels and flows from current frontend source, rendered UI, or supplied HTML. Never invent selectors.

Workflow

  1. Search existing specs and helpers; extend coverage without duplication. Define one outcome per case: applying and clearing a filter are separate outcomes.
  2. Put the spec under its correct feature/role project. If required auth/project support is missing, report the gap rather than use the wrong session.
  3. Classify data: stable fixtures for reads, uniquely identified disposable fixtures for mutations. Never edit/delete a row chosen by position. Cleanup must target only data owned by this test.
  4. Use the project's ID/tag registry. For a new suite, default to TC-{PLATFORM}-{MODULE}-{NNN}, one @priority-*, and @smoke or @regression; smoke must not depend on unavailable seeded data.
  5. Each functional case has a tc-doc block in the project's existing format: preconditions/role/environment, test data, exact UI actions and expected result. If no exporter/schema exists, use a simple structured comment and do not claim export support. Keep steps synchronized with the spec.
  6. Prefer getByRole and getByLabel, with exact names and scoped groups where repeated labels exist. Prefer existing accessible contracts; never rename them casually. Missing accessibility is a finding; fix the product only if within authorized scope.
  7. Keep specs as scenarios plus business assertions, preferably inline for single-use locators. Helpers navigate, act and synchronize; business assertions stay in specs. Mirror feature folders; separate generic utilities, shared product flows and feature helpers. Use typed Page, explicit returns and (page, options); follow existing interface naming.
  8. Use observable waits and retrying assertions, not fixed sleeps. Assert real results: a filter changes the result set; a save persists after reload or an independent API read. URL or toast alone is insufficient when persistence is the objective.
  9. Run the affected spec and applicable type/ID/document checks. Run a mutating scenario again to check repeatability when safe. Keep visual and accessibility snapshots in the project's separate tracks; never mix baseline updates into functional fixes.

Rules

  • No conditional visibility assertions or .first() to hide ambiguity. Scope locators accurately.
  • No redundant comments; intent comes from titles, manual scenario and assertions.
  • Do not weaken tests for product bugs. Preserve coverage, report the bug; any skip needs an explicit reason and counts as untested.
  • Do not start seeds, teardown or remote mutation runs until environment and data ownership are verified.

Common mistakes

Invented labels; wrong auth project; stable fixture mutation; helper-hidden assertions; fake smoke tags; manual steps that omit navigation; snapshot changes used as a test fix.

Validation

Confirm selectors have evidence, one outcome per test, manual/automated steps agree, fixtures are isolated and cleanup is bounded. Report actual pass/fail/skip/not-run counts and coverage gaps.

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.