e2e-test

An end-to-end test generation command for web and mobile applications. End-to-end tests follow a real user flow through the whole application; it uses Playwright for web tests and Detox for mobile tests.

In plain words
What is it for?
For generating tests for flows such as authentication, payments, search, settings, administration, profiles, and responsive layouts, with optional visual regression checks.
Why use it?
It helps turn discovered user flows into repeatable checks, including whether the interface looks the same and works across browsers.

Command

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 commands/alphaaiservice/cortex/e2e-test
Clone the repo
git clone --depth 1 https://github.com/alphaaiservice/cortex
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 12,355 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00046 $0.12355
Opus 5 $0.00023 $0.06177
Sonnet 5 $0.00009 $0.02471
Haiku 4.5 $0.00005 $0.01235

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

Security

Grade A, and why

e2e-test scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const response = await fetch(baseURL, { method: 'HEAD' });
commands/e2e-test.md · 1,586 lines

How it starts

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

End-to-End Test Generation

Generate comprehensive end-to-end tests for: $ARGUMENTS

Parse $ARGUMENTS for:

  • A specific flow name (e.g., auth, payment, crud, search, settings, admin, profile, responsive)
  • --all flag: generate E2E tests for every discovered user flow
  • --visual flag: include visual regression testing with baseline screenshots
  • If no arguments provided, default to --all

Step 1: Analyze Application Flows

1.1 Detect Project Type and Structure

# Detect if this is a web project (Next.js / React)
ls -la package.json 2>/dev/null
ls -la next.config.* 2>/dev/null
ls -la app/ 2>/dev/null
ls -la src/app/ 2>/dev/null
ls -la pages/ 2>/dev/null

# Detect if this is a mobile project (React Native / Expo)
ls -la app.json 2>/dev/null
ls -la expo-env.d.ts 2>/dev/null
ls -la metro.config.* 2>/dev/null
ls -la android/ 2>/dev/null
ls -la ios/ 2>/dev/null

1.2 Scan Web Routes (Next.js App Router)

Use Glob to find all route files:

  • **/app/**/page.tsx — Next.js 13+ App Router pages
  • **/app/**/page.jsx — JSX variant
  • **/pages/**/*.tsx — Pages Router (legacy)
  • **/pages/**/*.jsx — JSX variant

For each discovered page file:

  1. Read the file to understand the component
  2. Extract the route path from the file system path (e.g., app/dashboard/settings/page.tsx maps to /dashboard/settings)
  3. Identify dynamic route segments (e.g., [id], [slug], [...catchAll])
  4. Detect route groups (group-name) and exclude them from the URL path
  5. Identify layout files (layout.tsx) that wrap multiple routes
  6. Detect loading states (loading.tsx) and error boundaries (error.tsx)
  7. Detect middleware files (middleware.ts) that may redirect or protect routes
  8. Identify parallel routes and intercepting routes if present

1.3 Scan React Native Screens (if mobile project exists)

Use Glob to find all screen files:

  • **/screens/**/*.tsx
  • **/screens/**/*.jsx
  • **/app/**/_layout.tsx (Expo Router)
  • **/app/**/index.tsx (Expo Router)

Read the full file on GitHub · 1,586 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 · 1,586 lines · 46 tokens per session scan A d8ace8531450

Subscribe to this mod's changes

e2e-test is a command published in the GitHub repository alphaaiservice/cortex (1 stars, last pushed 25d ago), licensed MIT. It adds 46 tokens to every session and 12,355 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.