首页/ AI 技能 / @skilllib/skill-2014279395316281349
Skill站外收录 @skilllib/skill-2014279395316281349

playwright-testing

提供基于 Playwright 的端到端浏览器测试能力,支持在 PrairieLearn 环境中启动服务、加载测试课程,并通过语义化选择器模拟真实用户交互,确保功能与界面行为符合预期。

0.0 (0) 151 次安装 原作者 编程导航
收录于 2026-01-22
测试与安全 AI 技能

Skills.MD

New E2E tests should be created in `apps/prairielearn/src/tests/e2e`. Each test file should be named `*.e2e.spec.{ts,tsx}` and contain tests for a specific feature or user flow. `expect` and `test` should be imported from `apps/prairielearn/src/tests/e2e/fixtures.ts`. These include fixtures to start the PrairieLearn server and provide an editable test course. Prefer using selectors that use user-facing content, such as `getByRole`, `getByText`, and `getByLabelText`. If that's impractical, consider using `getByTestId` instead. Avoid using `locator()` with implementation details like CSS classes or IDs unless absolutely necessary.

评论 0

还没有评论,来抢沙发。