# Playwright E2e

> writing, running, and debugging Playwright tests. working with their output from github actions

- Skill: `forcedotcom/playwright-e2e-2` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add forcedotcom/playwright-e2e-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/forcedotcom/playwright-e2e-2/raw
- Safety review: pending (external: skill-scanner PASS, skillspector CAUTION)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: forcedotcom (https://skillmd.com/u/forcedotcom)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/forcedotcom/playwright-e2e-2

---


# Playwright E2E Tests

Guidelines for writing and iterating on Playwright tests for VS Code extensions.

## Required Reading

**Read ALL before responding:**

- `references/coding-playwright-tests.md` - Writing tests
- `references/iterating-playwright-tests.md` - Iterating on tests (lines 34-37: "Things to ignore")
- `references/analyze-e2e.md` - Analyzing E2E test results from CI

# Use shared utilities

Shared code (helpers, locators, configuration) for tests lives in `e2e-tests/shared/`.

## Span files (when debugging traces)

Available local + CI/GHA.

- Output: `~/.sf/vscode-spans/` — `web-*.jsonl` (test:e2e:web), `node-*.jsonl` (test:e2e:desktop)
- Auto-enabled (no manual enable needed)
- CI runs: copied into `test-results/spans/` artifacts (see workflow upload/download in `references/analyze-e2e.md`)
- Latest: `ls -lt ~/.sf/vscode-spans/`
- Clear before run for fresh output: `rm -rf ~/.sf/vscode-spans/`
- Format: JSONL; parse each line with `JSON.parse`
- Fields: `name`, `traceId`, `spanId`, `parentSpanId`, `durationMs`, `status`, `startTime`, `attributes`

See `.claude/skills/span-file-export/SKILL.md` for enable/OTLP vs file.

## Running tests (AI behavior)

When running Playwright tests (`npm run test:e2e:web`, `npm run test:e2e:desktop`, etc.), never block >30s. Use `run_in_background: true` so tests run while the AI continues. Check terminal output or the output file later.

## References

- https://playwright.dev/docs - Playwright docs

