一键导入
fp-fix
Fix failing E2E tests by modifying test implementations
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Fix failing E2E tests by modifying test implementations
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Add a new feature or suite to the E2E spec and generate corresponding tests
Create a new E2E_TESTS.md specification file for a package
Bootstrap E2E_TESTS.md specification files for a project
Validate that E2E_TESTS.md specification files are complete and well-structured
Update an existing E2E_TESTS.md specification to reflect changes
Framework-agnostic E2E testing principles, spec-driven test generation, and maintenance workflows
| name | fp-fix |
| description | Fix failing E2E tests by modifying test implementations |
Fix failing E2E tests by modifying test implementations. This command NEVER modifies E2E_TESTS.md spec files — the spec is the source of truth.
Additional instructions from the user: "$ARGUMENTS". Ignore if empty.
$ARGUMENTS, run only that.For each failing test:
Read the failing test file to understand the test implementation.
Read the corresponding E2E_TESTS.md spec to understand the intended behavior.
Classify the failure:
Test bug: The test implementation is wrong (bad assertion, incorrect setup, missing cleanup).
Stale test: The code under test changed but the test wasn't updated.
Environment issue: Missing dependency, port conflict, timing issue.
Flaky test: Passes sometimes, fails sometimes.
Apply fixes following these rules:
E2E_TESTS.md: If the spec seems wrong, report it to the user but don't change it.Missing cleanup:
// Add proper afterEach if missing
afterEach:
changeDirectory(originalCwd)
env.PATH = originalPath
safeCleanup(testDir)
Timing issues:
// Add polling with timeout instead of fixed waits
function waitFor(condition, timeout=30000, interval=500):
start = now()
while now() - start < timeout:
if condition():
return
wait(interval)
throw TimeoutError("condition not met within {timeout}ms")
Resource conflicts:
// Use unique resources per test
testDir = createTempDirectory("unique-prefix-") // Not a fixed path