e2e

A command for generating and running end-to-end tests with Playwright. End-to-end tests imitate complete user journeys through an application, such as logging in or completing a payment.

In plain words
What is it for?
Testing key user flows across browsers, checking multi-step interactions and integrations, identifying unstable tests, and producing HTML or JUnit reports.
Why use it?
It helps verify that multiple screens, browser actions, and front-end-to-back-end connections work together. Failed runs can include evidence such as screenshots, videos, and traces.

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/luohaothu/everything-codex/e2e
Clone the repo
git clone --depth 1 https://github.com/Luohaothu/everything-codex
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,672 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 92% copy Near-identical to another mod 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.00033 $0.02672
Opus 5 $0.00016 $0.01336
Sonnet 5 $0.00007 $0.00534
Haiku 4.5 $0.00003 $0.00267

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

Security

Grade A, and why

e2e 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.

Origin

This is a copy

92% identical to e2e — 213 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

docs/zh-CN/commands/e2e.md · 371 lines

How it starts

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

E2E 命令

此命令调用 e2e-runner 代理来使用 Playwright 生成、维护和执行端到端测试。

此命令的作用

  1. 生成测试旅程 - 为用户流程创建 Playwright 测试
  2. 运行 E2E 测试 - 跨浏览器执行测试
  3. 捕获工件 - 失败时的截图、视频、跟踪
  4. 上传结果 - HTML 报告和 JUnit XML
  5. 识别不稳定测试 - 隔离不稳定的测试

何时使用

在以下情况使用 /e2e

  • 测试关键用户旅程(登录、交易、支付)
  • 验证多步骤流程端到端工作
  • 测试 UI 交互和导航
  • 验证前端和后端之间的集成
  • 为生产部署做准备

工作原理

e2e-runner 代理将:

  1. 分析用户流程并识别测试场景
  2. 使用页面对象模型模式生成 Playwright 测试
  3. 跨多个浏览器(Chrome、Firefox、Safari)运行测试
  4. 捕获失败,包括截图、视频和跟踪
  5. 生成包含结果和工件的报告
  6. 识别不稳定测试并推荐修复方法

使用示例

User: /e2e Test the market search and view flow

Agent (e2e-runner):
# E2E Test Generation: Market Search and View Flow

## Test Scenario Identified

**User Journey:** Market Search → View Results → Click Market → View Details

**Test Coverage:**
1. Navigate to markets page
2. Perform semantic search
3. Verify search results
4. Click on first result
5. Verify market details page loads
6. Verify chart renders

## Generated Test Code

```typescript
// tests/e2e/markets/search-and-view.spec.ts
import { test, expect } from '@playwright/test'
import { MarketsPage } from '../../pages/MarketsPage'
import { MarketDetailsPage } from '../../pages/MarketDetailsPage'

test.describe('Market Search and View Flow', () => {
  test('user can search markets and view details', async ({ page }) => {
    // 1. Navigate to markets page
    const marketsPage = new MarketsPage(page)
    await marketsPage.goto()

    // Verify page loaded
    await expect(page).toHaveTitle(/Markets/)
    await expect(page.locator('h1')).toContainText('Markets')

    // 2. Perform semantic search
    await marketsPage.searchMarkets('election')

    // Wait for API response
    await page.waitForResponse(resp =>
      resp.url().includes('/api/markets/search') && resp.status() === 200
    )

    // 3. Verify search results
    const marketCards = marketsPage.marketCards
    await expect(marketCards.first()).toBeVisible()
    const resultCount = await marketCards.count()
    expect(resultCount).toBeGreaterThan(0)

Read the full file on GitHub · 371 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 · 371 lines · 33 tokens per session scan A 7e86f319edc5

Subscribe to this mod's changes

e2e is a command published in the GitHub repository Luohaothu/everything-codex (24 stars, last pushed 21d ago), licensed MIT. It adds 33 tokens to every session and 2,672 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to e2e, differing in 213 lines, and is treated as a copy.