Skip to main content

setup-e2e-testing

Set up Playwright + Testcontainers + axe-core for e2e and accessibility testing. Includes patterns for forms, tables, workflows. Use when setting up e2e tests or writing Playwright tests.

来源信息

仓库
redpanda-data/ui-harness
最近来源活动
2026年5月8日 11:21
检测到的 SKILL.md 语言
英语
星标
34
分支
4

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
setup-e2e-testing
description
Set up Playwright + Testcontainers + axe-core for e2e and accessibility testing. Includes patterns for forms, tables, workflows. Use when setting up e2e tests or writing Playwright tests.
paths
["e2e/**/*.spec.ts","playwright.config.ts"]
# E2E Testing ## Conventions - `e2e/*.spec.ts` -- all e2e tests use `.spec.ts` - Name by feature: `login.spec.ts`, `create-topic.spec.ts` - Selectors: `getByRole` > `getByLabel` > `getByText` > `getByTestId` > CSS - Test IDs: `{feature}-{element}`, `{feature}-{element}-{index}`, `{feature}-{state}` ## Accessibility -- axe on every page ```ts import { test, expect } from '../fixtures/base' test('page is accessible', async ({ page, makeAxeBuilder }) => { await page.goto('/topics/create') const results = await makeAxeBuilder().analyze() expect(results.violations).toEqual([]) }) ``` ## Monitor for E2E `Monitor: bun run test:e2e` -- stream results, react fail before suite finish. ## Agent-Browser vs Playwright | Task | Tool | |------|------| | Test suites | Playwright via `Monitor: bun run test:e2e` | | Generate selectors | `agent-browser snapshot` (a11y tree) | | Visual smoke test | `agent-browser screenshot --annotate` | | Interactive debug | Playwright UI mode | | CI | Playwright | | AI page inspection | agent-browser | Setup (install, config, fixtures, Testcontainers): see [SETUP.md](SETUP.md).
在 GitHub 查看