一键导入
e2e-testing
Playwright testing patterns for droneroute. Covers screenshot automation, test structure, and CI integration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Playwright testing patterns for droneroute. Covers screenshot automation, test structure, and CI integration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
PR-based development workflow for droneroute. Use when implementing features, fixing bugs, or making any code changes. Covers branch creation, CI checks, changelog entries, and PR creation.
WCAG 2.1 AA accessibility patterns for droneroute — color contrast, ARIA, keyboard navigation, Leaflet map a11y, and Radix UI component checklist.
Security patterns for droneroute — JWT auth guards, input validation, SQL injection prevention, and environment variable safety.
GitHub Issues tracking workflow for droneroute. Use when managing tasks, features, and bugs.
Before/after screenshot workflow for UI PRs. Covers capture techniques, annotation, and embedding in PRs and changelogs.
基于 SOC 职业分类
| name | e2e-testing |
| description | Playwright testing patterns for droneroute. Covers screenshot automation, test structure, and CI integration. |
Guide writing and maintaining Playwright-based tests and screenshot scripts for the droneroute application.
The project has Playwright scripts for automated screenshot capture:
scripts/screenshots.js — Captures 8+ screenshots of different mission types (orbit, grid survey, facade scan, pencil path, waypoints+POI, multiselect, elevation graph, gimbal pitch)scripts/screenshot-poi.js — Focused screenshot for gimbal-pitch/POI view (2x device scale factor)All screenshots are taken at coordinates: 41.25797725781744, 0.9322907667035154 (as defined in AGENTS.md).
Standard screenshot viewport: 1280x720
The map is rendered via react-leaflet. Key selectors:
.leaflet-containerpage.click('.leaflet-container', { position: { x, y } }).leaflet-marker-icon.leaflet-popup-contentThis app uses @radix-ui/react-*. Components use data-state attributes:
| Component | Selector pattern |
|---|---|
| Dialog | [role="dialog"] |
| Select | [role="combobox"] |
| Tab trigger | [role="tab"] |
| Dropdown item | [role="menuitem"] |
| Tooltip | [role="tooltip"] |
State changes happen synchronously via Zustand. After a UI action, the DOM updates on the next React render — use waitForSelector or expect(locator).toBeVisible() rather than arbitrary waits.
tests/
screenshots/ # Visual capture scripts
*.spec.ts
e2e/ # Interactive flow tests (future)
*.spec.ts
Each test should start from a clean state. For the map application:
Tests run in the CI pipeline. The build job must succeed before tests can run. Playwright requires Chromium:
npx playwright install chromium --with-deps
.spec.ts extensionwaitForTimeout — use waitForSelector or assertions