用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aiFabricoCom/fabrico-collections-codex --skill fabrico-e2e-testing命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Audit AWS cost optimization and tagging compliance.
Audit GCP cost optimization and labeling compliance.
Process discovery materials into Jira-ready epics and user stories, or iterate on an existing backlog.
基于 SOC 职业分类
正在显示 SKILL.md
| name | fabrico-e2e-testing |
| description | Playwright Page Objects, mocking, flaky-test fixes, and CI readiness. |
export class FeaturePage {
constructor(readonly page: Page) {}
get submitBtn() {
return this.page.getByRole('button', { name: 'Submit' });
}
async navigate() { await this.page.goto('/feature'); }
}
test('should [behavior] when [condition]', async ({ page }) => {
const id = `test-${Date.now()}-${test.info().parallelIndex}`;
// Arrange → Act → Assert
});
await page.route('**/api/external/**', route => route.fulfill({ status: 200, body: '{}' }));
RUN → FAIL? → DEBUG (browser_snapshot via the playwright MCP server) → FIX → REPEAT
When debugging, use the playwright MCP server to capture a structured page snapshot, inspect the accessibility tree, and locate failing elements.
| Rule | Limit |
|---|---|
| Max per test | 5 iterations → test.fixme() |
| Max per suite | 15 iterations → stop |
| Flaky detection | 3 pass/fail mix → investigate |
| Stability | 3+ consecutive passes required |
| App bug | Mark test.fixme('BUG: desc') |
| Error | Action |
|---|---|
| Timeout | Increase once → check selector → check if element renders |
| Element not found | Alternative locator → check DOM → verify page loaded |
| Network | Retry → consider mock → verify backend |
| Flaky | Explicit waits → check race conditions → run 5x |
| App bug | Mark test.fixme('BUG: desc') - test is skipped; CI usually still passes unless skipped tests fail the build |
npx playwright test --headed=falseprocess.env.BASE_URLAlways: accessible locators, unique test data, 3+ passes, mock external APIs
Never: waitForTimeout(), CSS selectors, test interdependencies, hardcoded creds