[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MG0GKFHCMS2H04S9RY75V5":3,"skill-same:01M6MG0GKFHCMS2H04S9RY75V5":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":26,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":47,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":50,"updatedAt":51,"install":52,"resources":64},"01M6MG0GKFHCMS2H04S9RY75V5","frontend\u002Ftesting-guide",null,"前端测试编写指南，包括单元测试、集成测试和E2E测试的编写方法和最佳实践","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FechoVic\u002Fboss-skill\u002Fskill\u002Fskills\u002Ffrontend\u002Ftesting-guide\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[27,28,29,30,31,32,33,34],"testing","frontend","guide","frontend testing","testing guide","frontend testing guide","methodology","true","2026-11-10 10:12:30",false,"---\n\nname: frontend\u002Ftesting-guide\ndescription: 前端测试编写指南，包括单元测试、集成测试和E2E测试的编写方法和最佳实践\ntype: methodology\nagent: boss-frontend\nmetadata:\ninternal: true\n---\n\n# 前端测试编写指南\n\n## 测试要求（强制）\n\n> **职责边界**：Frontend Agent 是测试的**编写者**，QA Agent 是测试的**验证者**。\n\n### 测试金字塔\n\n| 测试类型     | 占比 | 要求                       |\n| ------------ | ---- | -------------------------- |\n| **单元测试** | ~70% | 每个组件\u002FHook 必须有测试   |\n| **集成测试** | ~20% | 组件交互、状态管理测试     |\n| **E2E 测试** | ~10% | **必须编写**，覆盖用户流程 |\n\n## 单元测试编写\n\n### 组件渲染测试\n\n```typescript\n\u002F\u002F Button.test.tsx\nimport { render, screen } from '@testing-library\u002Freact';\nimport { Button } from '.\u002FButton';\n\ndescribe('Button', () => {\n  it('renders with text', () => {\n    render(\u003CButton>Click me\u003C\u002FButton>);\n    expect(screen.getByText('Click me')).toBeInTheDocument();\n  });\n\n  it('calls onClick when clicked', () => {\n    const handleClick = jest.fn();\n    render(\u003CButton onClick={handleClick}>Click\u003C\u002FButton>);\n    screen.getByText('Click').click();\n    expect(handleClick).toHaveBeenCalledTimes(1);\n  });\n\n  it('is disabled when disabled prop is true', () => {\n    render(\u003CButton disabled>Click\u003C\u002FButton>);\n    expect(screen.getByText('Click')).toBeDisabled();\n  });\n});\n```\n\n### Hook 测试\n\n```typescript\n\u002F\u002F useCounter.test.ts\nimport { renderHook, act } from '@testing-library\u002Freact';\nimport { useCounter } from '.\u002FuseCounter';\n\ndescribe('useCounter', () => {\n  it('initializes with default value', () => {\n    const { result } = renderHook(() => useCounter());\n    expect(result.current.count).toBe(0);\n  });\n\n  it('increments count', () => {\n    const { result } = renderHook(() => useCounter());\n    act(() => {\n      result.current.increment();\n    });\n    expect(result.current.count).toBe(1);\n  });\n});\n```\n\n### 表单验证测试\n\n```typescript\n\u002F\u002F LoginForm.test.tsx\nimport { render, screen, waitFor } from '@testing-library\u002Freact';\nimport userEvent from '@testing-library\u002Fuser-event';\nimport { LoginForm } from '.\u002FLoginForm';\n\ndescribe('LoginForm', () => {\n  it('shows validation error for invalid email', async () => {\n    render(\u003CLoginForm \u002F>);\n    const emailInput = screen.getByLabelText('Email');\n    \n    await userEvent.type(emailInput, 'invalid-email');\n    await userEvent.tab(); \u002F\u002F Trigger blur\n    \n    await waitFor(() => {\n      expect(screen.getByText('Invalid email format')).toBeInTheDocument();\n    });\n  });\n\n  it('submits form with valid data', async () => {\n    const onSubmit = jest.fn();\n    render(\u003CLoginForm onSubmit={onSubmit} \u002F>);\n    \n    await userEvent.type(screen.getByLabelText('Email'), 'user@example.com');\n    await userEvent.type(screen.getByLabelText('Password'), '\u003CPASSWORD>');\n    await userEvent.click(screen.getByRole('button', { name: 'Login' }));\n    \n    await waitFor(() => {\n      expect(onSubmit).toHaveBeenCalledWith({\n        email: 'user@example.com',\n        password: '\u003CPASSWORD>',\n      });\n    });\n  });\n});\n```\n\n## 集成测试编写\n\n### 组件交互测试\n\n```typescript\n\u002F\u002F UserList.test.tsx\nimport { render, screen, waitFor } from '@testing-library\u002Freact';\nimport userEvent from '@testing-library\u002Fuser-event';\nimport { UserList } from '.\u002FUserList';\nimport { UserProvider } from '.\u002FUserContext';\n\ndescribe('UserList integration', () => {\n  it('adds new user to list', async () => {\n    render(\n      \u003CUserProvider>\n        \u003CUserList \u002F>\n      \u003C\u002FUserProvider>\n    );\n    \n    \u002F\u002F 打开添加用户表单\n    await userEvent.click(screen.getByText('Add User'));\n    \n    \u002F\u002F 填写表单\n    await userEvent.type(screen.getByLabelText('Name'), 'John Doe');\n    await userEvent.type(screen.getByLabelText('Email'), 'john@example.com');\n    \n    \u002F\u002F 提交\n    await userEvent.click(screen.getByRole('button', { name: 'Submit' }));\n    \n    \u002F\u002F 验证用户出现在列表中\n    await waitFor(() => {\n      expect(screen.getByText('John Doe')).toBeInTheDocument();\n      expect(screen.getByText('john@example.com')).toBeInTheDocument();\n    });\n  });\n});\n```\n\n### 状态管理测试\n\n```typescript\n\u002F\u002F store.test.ts\nimport { renderHook, act } from '@testing-library\u002Freact';\nimport { useStore } from '.\u002Fstore';\n\ndescribe('Store integration', () => {\n  it('updates user state across components', () => {\n    const { result } = renderHook(() => useStore());\n\n    act(() => {\n      result.current.setUser({ id: '1', name: 'Alice' });\n    });\n\n    expect(result.current.user).toEqual({ id: '1', name: 'Alice' });\n\n    act(() => {\n      result.current.updateUserName('Bob');\n    });\n\n    expect(result.current.user?.name).toBe('Bob');\n  });\n});\n```\n\n## E2E 测试编写（必须）\n\n> **完整 Playwright 方法论**：详见 `Skill(skill: \"qa\u002Fe2e-playwright\")`，包含项目初始化、Page Object Model、认证复用、API Mock、视觉回归、多浏览器测试、CI 集成和调试技巧。\n\n### E2E 测试必须覆盖\n\n- ✅ 创建流程（如：添加数据）\n- ✅ 编辑流程（如：修改数据）\n- ✅ 删除流程（如：删除数据）\n- ✅ 列表展示（如：查看列表）\n- ✅ 核心业务流程\n\n### Playwright 示例（Page Object Model）\n\n```typescript\n\u002F\u002F e2e\u002Fpages\u002Fuser-list.page.ts\nimport { type Page, type Locator } from '@playwright\u002Ftest';\n\nexport class UserListPage {\n  private readonly addButton: Locator;\n  private readonly table: Locator;\n\n  constructor(private readonly page: Page) {\n    this.addButton = page.getByRole('button', { name: '添加用户' });\n    this.table = page.getByRole('table');\n  }\n\n  async goto() {\n    await this.page.goto('\u002Fusers');\n  }\n  async clickAddUser() {\n    await this.addButton.click();\n  }\n  getTable() {\n    return this.table;\n  }\n\n  async editUser(name: string) {\n    await this.page.getByRole('row', { name }).getByRole('button', { name: '编辑' }).click();\n  }\n  async deleteUser(name: string) {\n    await this.page.getByRole('row', { name }).getByRole('button', { name: '删除' }).click();\n  }\n  async confirmDelete() {\n    await this.page.getByRole('button', { name: '确认' }).click();\n  }\n}\n```\n\n```typescript\n\u002F\u002F e2e\u002Fspecs\u002Fcrud\u002Fuser-management.spec.ts\nimport { test, expect } from '@playwright\u002Ftest';\nimport { UserListPage } from '..\u002F..\u002Fpages\u002Fuser-list.page';\n\ntest.describe('用户管理 CRUD', () => {\n  let userList: UserListPage;\n\n  test.beforeEach(async ({ page }) => {\n    userList = new UserListPage(page);\n    await userList.goto();\n  });\n\n  test('创建 → 编辑 → 删除完整流程', async ({ page }) => {\n    \u002F\u002F 创建\n    await userList.clickAddUser();\n    await page.getByLabel('姓名').fill('测试用户');\n    await page.getByLabel('邮箱').fill('test@example.com');\n    await page.getByRole('button', { name: '提交' }).click();\n    await expect(page.getByText('测试用户')).toBeVisible();\n\n    \u002F\u002F 编辑\n    await userList.editUser('测试用户');\n    await page.getByLabel('姓名').fill('修改后的用户');\n    await page.getByRole('button', { name: '提交' }).click();\n    await expect(page.getByText('修改后的用户')).toBeVisible();\n\n    \u002F\u002F 删除\n    await userList.deleteUser('修改后的用户');\n    await userList.confirmDelete();\n    await expect(page.getByText('修改后的用户')).not.toBeVisible();\n  });\n\n  test('列表分页展示', async ({ page }) => {\n    await expect(userList.getTable()).toBeVisible();\n    await page.getByRole('button', { name: 'Next' }).click();\n    await expect(page).toHaveURL(\u002Fpage=2\u002F);\n  });\n});\n```\n\n### 定位器优先级\n\n| 优先级 | 方法          | 说明               |\n| ------ | ------------- | ------------------ |\n| 1      | `getByRole`   | 无障碍语义，最稳定 |\n| 2      | `getByLabel`  | 表单元素首选       |\n| 3      | `getByText`   | 静态文本           |\n| 4      | `getByTestId` | 无语义标记时兜底   |\n| 5      | CSS\u002FXPath     | **尽量避免**       |\n\n## 测试最佳实践\n\n### 测试命名\n\n- 使用描述性的测试名称\n- 格式：`it('should [expected behavior] when [condition]')`\n- 示例：`it('should show error message when email is invalid')`\n\n### 测试隔离\n\n- 每个测试独立运行，不依赖其他测试\n- 使用 beforeEach 设置初始状态\n- 使用 afterEach 清理副作用\n\n### Mock 策略\n\n- Mock 外部依赖（API、第三方库）\n- 不要 Mock 被测试的代码\n- 使用 MSW（Mock Service Worker）Mock API\n\n```typescript\n\u002F\u002F mocks\u002Fhandlers.ts\nimport { rest } from 'msw';\n\nexport const handlers = [\n  rest.get('\u002Fapi\u002Fusers', (req, res, ctx) => {\n    return res(\n      ctx.json([\n        { id: '1', name: 'Alice' },\n        { id: '2', name: 'Bob' },\n      ]),\n    );\n  }),\n];\n```\n\n### 边界条件测试\n\n- 空数据：列表为空时的展示\n- 错误状态：API 失败时的处理\n- 加载状态：数据加载中的展示\n- 极限值：最大\u002F最小输入值\n\n### 无障碍测试\n\n```typescript\nit('is accessible', async () => {\n  const { container } = render(\u003CButton>Click\u003C\u002FButton>);\n  const results = await axe(container);\n  expect(results).toHaveNoViolations();\n});\n```\n\n## 测试覆盖率要求\n\n- 语句覆盖率：≥ 80%\n- 分支覆盖率：≥ 75%\n- 函数覆盖率：≥ 80%\n- 行覆盖率：≥ 80%\n\n运行覆盖率报告：\n```bash\nnpm test -- --coverage\n```\n\n## 测试报告格式\n\n实现完成后，在输出中包含：\n\n**测试添加**：\n| 类型         | 文件                                   | 描述                      |\n| ------------ | -------------------------------------- | ------------------------- |\n| 单元测试     | `src\u002Fcomponents\u002FButton.test.tsx`       | Button 组件渲染和交互测试 |\n| 集成测试     | `src\u002Ffeatures\u002Fusers\u002FUserList.test.tsx` | 用户列表增删改查集成测试  |\n| **E2E 测试** | `e2e\u002Fuser-management.spec.ts`          | 用户管理完整流程 E2E 测试 |\n\n**测试结果**：\n- 通过：25 \u002F 失败：0\n- 覆盖率：85%\n- E2E 测试：✅ 已编写并通过\n","# 前端测试编写指南\n\n## 测试要求（强制）\n\n> **职责边界**：Frontend Agent 是测试的**编写者**，QA Agent 是测试的**验证者**。\n\n### 测试金字塔\n\n| 测试类型     | 占比 | 要求                       |\n| ------------ | ---- | -------------------------- |\n| **单元测试** | ~70% | 每个组件\u002FHook 必须有测试   |\n| **集成测试** | ~20% | 组件交互、状态管理测试     |\n| **E2E 测试** | ~10% | **必须编写**，覆盖用户流程 |\n\n## 单元测试编写\n\n### 组件渲染测试\n\n```typescript\n\u002F\u002F Button.test.tsx\nimport { render, screen } from '@testing-library\u002Freact';\nimport { Button } from '.\u002FButton';\n\ndescribe('Button', () => {\n  it('renders with text', () => {\n    render(\u003CButton>Click me\u003C\u002FButton>);\n    expect(screen.getByText('Click me')).toBeInTheDocument();\n  });\n\n  it('calls onClick when clicked', () => {\n    const handleClick = jest.fn();\n    render(\u003CButton onClick={handleClick}>Click\u003C\u002FButton>);\n    screen.getByText('Click').click();\n    expect(handleClick).toHaveBeenCalledTimes(1);\n  });\n\n  it('is disabled when disabled prop is true', () => {\n    render(\u003CButton disabled>Click\u003C\u002FButton>);\n    expect(screen.getByText('Click')).toBeDisabled();\n  });\n});\n```\n\n### Hook 测试\n\n```typescript\n\u002F\u002F useCounter.test.ts\nimport { renderHook, act } from '@testing-library\u002Freact';\nimport { useCounter } from '.\u002FuseCounter';\n\ndescribe('useCounter', () => {\n  it('initializes with default value', () => {\n    const { result } = renderHook(() => useCounter());\n    expect(result.current.count).toBe(0);\n  });\n\n  it('increments count', () => {\n    const { result } = renderHook(() => useCounter());\n    act(() => {\n      result.current.increment();\n    });\n    expect(result.current.count).toBe(1);\n  });\n});\n```\n\n### 表单验证测试\n\n```typescript\n\u002F\u002F LoginForm.test.tsx\nimport { render, screen, waitFor } from '@testing-library\u002Freact';\nimport userEvent from '@testing-library\u002Fuser-event';\nimport { LoginForm } from '.\u002FLoginForm';\n\ndescribe('LoginForm', () => {\n  it('shows validation error for invalid email', async () => {\n    render(\u003CLoginForm \u002F>);\n    const emailInput = screen.getByLabelText('Email');\n    \n    await userEvent.type(emailInput, 'invalid-email');\n    await userEvent.tab(); \u002F\u002F Trigger blur\n    \n    await waitFor(() => {\n      expect(screen.getByText('Invalid email format')).toBeInTheDocument();\n    });\n  });\n\n  it('submits form with valid data', async () => {\n    const onSubmit = jest.fn();\n    render(\u003CLoginForm onSubmit={onSubmit} \u002F>);\n    \n    await userEvent.type(screen.getByLabelText('Email'), 'user@example.com');\n    await userEvent.type(screen.getByLabelText('Password'), '\u003CPASSWORD>');\n    await userEvent.click(screen.getByRole('button', { name: 'Login' }));\n    \n    await waitFor(() => {\n      expect(onSubmit).toHaveBeenCalledWith({\n        email: 'user@example.com',\n        password: '\u003CPASSWORD>',\n      });\n    });\n  });\n});\n```\n\n## 集成测试编写\n\n### 组件交互测试\n\n```typescript\n\u002F\u002F UserList.test.tsx\nimport { render, screen, waitFor } from '@testing-library\u002Freact';\nimport userEvent from '@testing-library\u002Fuser-event';\nimport { UserList } from '.\u002FUserList';\nimport { UserProvider } from '.\u002FUserContext';\n\ndescribe('UserList integration', () => {\n  it('adds new user to list', async () => {\n    render(\n      \u003CUserProvider>\n        \u003CUserList \u002F>\n      \u003C\u002FUserProvider>\n    );\n    \n    \u002F\u002F 打开添加用户表单\n    await userEvent.click(screen.getByText('Add User'));\n    \n    \u002F\u002F 填写表单\n    await userEvent.type(screen.getByLabelText('Name'), 'John Doe');\n    await userEvent.type(screen.getByLabelText('Email'), 'john@example.com');\n    \n    \u002F\u002F 提交\n    await userEvent.click(screen.getByRole('button', { name: 'Submit' }));\n    \n    \u002F\u002F 验证用户出现在列表中\n    await waitFor(() => {\n      expect(screen.getByText('John Doe')).toBeInTheDocument();\n      expect(screen.getByText('john@example.com')).toBeInTheDocument();\n    });\n  });\n});\n```\n\n### 状态管理测试\n\n```typescript\n\u002F\u002F store.test.ts\nimport { renderHook, act } from '@testing-library\u002Freact';\nimport { useStore } from '.\u002Fstore';\n\ndescribe('Store integration', () => {\n  it('updates user state across components', () => {\n    const { result } = renderHook(() => useStore());\n\n    act(() => {\n      result.current.setUser({ id: '1', name: 'Alice' });\n    });\n\n    expect(result.current.user).toEqual({ id: '1', name: 'Alice' });\n\n    act(() => {\n      result.current.updateUserName('Bob');\n    });\n\n    expect(result.current.user?.name).toBe('Bob');\n  });\n});\n```\n\n## E2E 测试编写（必须）\n\n> **完整 Playwright 方法论**：详见 `Skill(skill: \"qa\u002Fe2e-playwright\")`，包含项目初始化、Page Object Model、认证复用、API Mock、视觉回归、多浏览器测试、CI 集成和调试技巧。\n\n### E2E 测试必须覆盖\n\n- ✅ 创建流程（如：添加数据）\n- ✅ 编辑流程（如：修改数据）\n- ✅ 删除流程（如：删除数据）\n- ✅ 列表展示（如：查看列表）\n- ✅ 核心业务流程\n\n### Playwright 示例（Page Object Model）\n\n```typescript\n\u002F\u002F e2e\u002Fpages\u002Fuser-list.page.ts\nimport { type Page, type Locator } from '@playwright\u002Ftest';\n\nexport class UserListPage {\n  private readonly addButton: Locator;\n  private readonly table: Locator;\n\n  constructor(private readonly page: Page) {\n    this.addButton = page.getByRole('button', { name: '添加用户' });\n    this.table = page.getByRole('table');\n  }\n\n  async goto() {\n    await this.page.goto('\u002Fusers');\n  }\n  async clickAddUser() {\n    await this.addButton.click();\n  }\n  getTable() {\n    return this.table;\n  }\n\n  async editUser(name: string) {\n    await this.page.getByRole('row', { name }).getByRole('button', { name: '编辑' }).click();\n  }\n  async deleteUser(name: string) {\n    await this.page.getByRole('row', { name }).getByRole('button', { name: '删除' }).click();\n  }\n  async confirmDelete() {\n    await this.page.getByRole('button', { name: '确认' }).click();\n  }\n}\n```\n\n```typescript\n\u002F\u002F e2e\u002Fspecs\u002Fcrud\u002Fuser-management.spec.ts\nimport { test, expect } from '@playwright\u002Ftest';\nimport { UserListPage } from '..\u002F..\u002Fpages\u002Fuser-list.page';\n\ntest.describe('用户管理 CRUD', () => {\n  let userList: UserListPage;\n\n  test.beforeEach(async ({ page }) => {\n    userList = new UserListPage(page);\n    await userList.goto();\n  });\n\n  test('创建 → 编辑 → 删除完整流程', async ({ page }) => {\n    \u002F\u002F 创建\n    await userList.clickAddUser();\n    await page.getByLabel('姓名').fill('测试用户');\n    await page.getByLabel('邮箱').fill('test@example.com');\n    await page.getByRole('button', { name: '提交' }).click();\n    await expect(page.getByText('测试用户')).toBeVisible();\n\n    \u002F\u002F 编辑\n    await userList.editUser('测试用户');\n    await page.getByLabel('姓名').fill('修改后的用户');\n    await page.getByRole('button', { name: '提交' }).click();\n    await expect(page.getByText('修改后的用户')).toBeVisible();\n\n    \u002F\u002F 删除\n    await userList.deleteUser('修改后的用户');\n    await userList.confirmDelete();\n    await expect(page.getByText('修改后的用户')).not.toBeVisible();\n  });\n\n  test('列表分页展示', async ({ page }) => {\n    await expect(userList.getTable()).toBeVisible();\n    await page.getByRole('button', { name: 'Next' }).click();\n    await expect(page).toHaveURL(\u002Fpage=2\u002F);\n  });\n});\n```\n\n### 定位器优先级\n\n| 优先级 | 方法          | 说明               |\n| ------ | ------------- | ------------------ |\n| 1      | `getByRole`   | 无障碍语义，最稳定 |\n| 2      | `getByLabel`  | 表单元素首选       |\n| 3      | `getByText`   | 静态文本           |\n| 4      | `getByTestId` | 无语义标记时兜底   |\n| 5      | CSS\u002FXPath     | **尽量避免**       |\n\n## 测试最佳实践\n\n### 测试命名\n\n- 使用描述性的测试名称\n- 格式：`it('should [expected behavior] when [condition]')`\n- 示例：`it('should show error message when email is invalid')`\n\n### 测试隔离\n\n- 每个测试独立运行，不依赖其他测试\n- 使用 beforeEach 设置初始状态\n- 使用 afterEach 清理副作用\n\n### Mock 策略\n\n- Mock 外部依赖（API、第三方库）\n- 不要 Mock 被测试的代码\n- 使用 MSW（Mock Service Worker）Mock API\n\n```typescript\n\u002F\u002F mocks\u002Fhandlers.ts\nimport { rest } from 'msw';\n\nexport const handlers = [\n  rest.get('\u002Fapi\u002Fusers', (req, res, ctx) => {\n    return res(\n      ctx.json([\n        { id: '1', name: 'Alice' },\n        { id: '2', name: 'Bob' },\n      ]),\n    );\n  }),\n];\n```\n\n### 边界条件测试\n\n- 空数据：列表为空时的展示\n- 错误状态：API 失败时的处理\n- 加载状态：数据加载中的展示\n- 极限值：最大\u002F最小输入值\n\n### 无障碍测试\n\n```typescript\nit('is accessible', async () => {\n  const { container } = render(\u003CButton>Click\u003C\u002FButton>);\n  const results = await axe(container);\n  expect(results).toHaveNoViolations();\n});\n```\n\n## 测试覆盖率要求\n\n- 语句覆盖率：≥ 80%\n- 分支覆盖率：≥ 75%\n- 函数覆盖率：≥ 80%\n- 行覆盖率：≥ 80%\n\n运行覆盖率报告：\n```bash\nnpm test -- --coverage\n```\n\n## 测试报告格式\n\n实现完成后，在输出中包含：\n\n**测试添加**：\n| 类型         | 文件                                   | 描述                      |\n| ------------ | -------------------------------------- | ------------------------- |\n| 单元测试     | `src\u002Fcomponents\u002FButton.test.tsx`       | Button 组件渲染和交互测试 |\n| 集成测试     | `src\u002Ffeatures\u002Fusers\u002FUserList.test.tsx` | 用户列表增删改查集成测试  |\n| **E2E 测试** | `e2e\u002Fuser-management.spec.ts`          | 用户管理完整流程 E2E 测试 |\n\n**测试结果**：\n- 通过：25 \u002F 失败：0\n- 覆盖率：85%\n- E2E 测试：✅ 已编写并通过\n",{"name":5,"type":33,"agent":40,"internal":41,"metadata":6,"description":7},"boss-frontend",true,"main","2b63f856ce19c2a797929cacabd9e0fc936812fa","plugins\u002FechoVic\u002Fboss-skill\u002Fskill\u002Fskills\u002Ffrontend\u002Ftesting-guide",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":41},[54,57,60],{"tool":55,"command":56},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill frontend\u002Ftesting-guide",{"tool":58,"command":59},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill frontend\u002Ftesting-guide",{"tool":61,"command":62},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill frontend\u002Ftesting-guide","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FechoVic\u002Fboss-skill\u002Fskill\u002Fskills\u002Ffrontend\u002Ftesting-guide\u002FSKILL.md",[],[66,76,84,92,100,108],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":70,"licenseFileUrl":71,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":75},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":70,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":75},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":70,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":75},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":70,"licenseFileUrl":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":75},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":70,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":75},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":70,"licenseFileUrl":112,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":75},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]