Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Designs frontend tests using the repo's configured React, browser, and API-mocking tools such as RTL, MSW, Vitest, and Playwright.
65% 87%+22 ptsof test cases passed
Passed 20 of 23 test cases with the skill, and 15 of 23 without it.
This test ran on v11. v18 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Not used yet
检查仓库现有的浏览器测试配置、脚本、fixtures、相邻测试以及 CI 路由。保留现有的测试框架、导入方式、定位器约定、setup 生命周期、文件命名和测试位置。
当不存在浏览器测试框架时,仅在目标行为必须通过真实浏览器观察,且成本更低的现有检查无法证明该行为时,才要求浏览器级别的证据。如果需要,从仓库自身及适用的外部依据中选择足以满足需求且侵入面最小的测试框架;否则使用成本更低的可观测边界。将无法使用的执行环境报告为证明局限,而不要把它当作需要用户决定的事项。
本工作流中的 E2E 测试分为两条通道:
| 通道 | 后端设置 | 适用模式 |
|---|---|---|
| fixture-e2e | 通过 page.route() 或 fixture 加载器模拟;无真实服务 | 测试结构规则、定位器策略、断言内容、下方基于 Fixture 的后端小节 |
| service-integration-e2e | 使用真实服务的本地运行栈 | 上述全部内容,外加 E2E 环境前提条件、针对应用真实登录流程的真实认证 fixture,以及预置的测试数据 |
骨架代码中的 @lane: 注解声明了该测试所属的通道。据此选择对应的实现模式。
@playwright/testimport { test, expect } from '@playwright/test'所有内容都位于 tests/e2e/ 下:测试文件位于其根目录,页面对象位于 pages/(各通道共用),fixtures 位于 fixtures/,fixture-e2e 使用的静态 fixture 数据位于 data/。这些文件同样匹配单元测试运行器的 *.test.ts 模式,因此应将 tests/e2e/ 排除在其发现范围之外(Vitest 的 exclude)。
{FeatureName}.fixture-e2e.test.ts{FeatureName}.service-e2e.test.ts{PageName}.page.ts{Purpose}.fixture.ts{scenario}.fixture.jsonSkills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.