一键导入
fgwrite-e2e
Write Playwright e2e tests in fg-manifold and optionally validate on a preview environment using the rodney CLI
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Write Playwright e2e tests in fg-manifold and optionally validate on a preview environment using the rodney CLI
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Send current plan + Repomix-packed project context to Grok for expert review via gr CLI. Works as both a manual skill invocation and automatic PostToolUse hook.
Interactively set up the Ralph Wiggum autonomous development workflow for a project. Use when initializing Ralph loops, configuring harness/model/permissions, or scaffolding backpressure for autonomous AI development.
Set up parallel autonomous agent infrastructure for test-driven development. Multiple Claude instances coordinate via git to solve complex implementation tasks. Based on Anthropic's C compiler methodology.
Add stream visualization TUI to an existing Ralph loop setup. Shows tool calls, text output, and git diffs in a clean terminal display.
Interview user in-depth to create a detailed spec
| name | fg:write-e2e |
| description | Write Playwright e2e tests in fg-manifold and optionally validate on a preview environment using the rodney CLI |
You are tasked with writing Playwright e2e tests for a FacilityGrid feature. Tests live in fg-manifold/lib/compose/e2e/.
fg-manifold/lib/compose/e2e/
├── playwright.config.ts # Config (baseURL, projects, timeouts)
├── page-objects/ # Page Object Model classes
├── tests/
│ ├── auth/auth.setup.ts # Pre-test auth (saves .auth/user.json)
│ ├── helpers/auth-state.ts # ensureAuthenticated() and token utils
│ └── <feature>/ # Tests organized by feature area
└── fixtures/ # Generated test data (gitignored)
Every authenticated test MUST use ensureAuthenticated() after navigation. This is non-negotiable — see auth.md for why.
import { test, expect } from '@playwright/test';
import { ensureAuthenticated } from '../helpers/auth-state';
test.describe('Feature Name', () => {
test.describe.configure({ mode: 'serial' });
test('does the thing', async ({ page }) => {
await page.goto('/main/some-page', { timeout: 15000 });
await ensureAuthenticated(page, '/main/some-page');
// ...assertions — auth is guaranteed valid
});
});
auth.md — Auth token handling is the #1 source of flaky tests. Understand the 300s TTL issue before writing anything.selectors-and-data.md — ag-grid selectors, SPA navigation, feature gates, and test data patterns.rodney.md for the rodney CLI.Page objects go in e2e/page-objects/. Follow existing patterns:
import { Page, Locator, expect } from '@playwright/test';
export class MyPage {
readonly page: Page;
readonly someElement: Locator;
constructor(page: Page) {
this.page = page;
this.someElement = page.locator('.my-selector');
}
async goto() {
await this.page.goto('/main/path/to/page');
// Use 'domcontentloaded' — 'networkidle' hangs on SPA polling/websockets
await this.page.waitForLoadState('domcontentloaded', { timeout: 15000 });
}
}
cd fg-manifold/lib/compose/e2e
npx playwright test # Run all
npx playwright test tests/feature/my-test.spec.ts # Run specific file
npx playwright test -g "test name" # Run by name
npx playwright test --headed # Visible browser
tilt ci -- e2e # Via Tilt
Before committing e2e tests, verify:
npx playwright test tests/<feature>/page.goto() to a protected route is followed by ensureAuthenticated()test.describe.configure({ mode: 'serial' }) is setafterEachLoginPage.loginAsTestUser())page-objects/test.skip(!process.env.FEATURE_FLAG, 'reason')