원클릭으로
playwright-testing
Write end-to-end browser tests using Playwright.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Write end-to-end browser tests using Playwright.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when changing or reviewing PrairieLearn element question.html contracts, including schema-level attributes/children, Python semantic validation, docs, and AI HTML validation support lists.
Conventions for writing tRPC routers and procedures.
Backwards compatibility rules when changing element controllers in `apps/prairielearn/elements/`.
Dealing with groups and teams in PrairieLearn, and confusion about table/column/variable names.
| name | playwright-testing |
| description | Write 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 *.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 getByLabel. If that's impractical, consider using getByTestId instead. Add data-testid attributes or aria-label to page components when needed. Avoid using locator() with implementation details like CSS classes or IDs unless absolutely necessary.
Playwright e2e tests run fully in parallel (fullyParallel: true). Each test must be self-contained — set up its own state (users, enrollments, etc.) rather than relying on shared mutable state from beforeAll. Use the courseInstance fixture for the default course instance. Don't use module-level variables to share state between tests.