金色时刻 · 15:48
让好资源,触手可及
AGENT SKILL

playwright-testing

playwright-testing 是面向测试与安全的 Agent Skill,来自 PrairieLearn/PrairieLearn。查看技能说明、操作步骤与使用约定,并通过原项目了解详细用法。

Write end-to-end browser tests using Playwright.

SKILL.md

下载 MD ↓
nameplaywright-testing
descriptionWrite end-to-end browser tests using Playwright.

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.

来源:PrairieLearn/PrairieLearn · MIT 许可 · 许可原文 · MD 为来源页保存的历史版本