hayotbekismoilov/all-software/adding-e2e-tests
Claude Code and agent skill by hayotbekismoilov/all-software
- community
Checking that the SKILL.md file is still in the repository.
Set up Playwright end-to-end testing in a project, including test configuration, example tests, and CI integration.
Install
npx vskill@latest install hayotbekismoilov/all-software/adding-e2e-testsSKILL.md
The same SKILL.md was published earlier as spencerpauly/awesome-cursor-skills/adding-e2e-tests.
Add E2E Tests (Playwright)
Use this skill when the user asks to add end-to-end tests, browser tests, integration tests, or set up Playwright.
Steps
- Install Playwright
``bash npm init playwright@latest ``
This creates playwright.config.ts, a tests/ directory, and installs browsers. If the project already has a test runner, install manually:
``bash npm install -D @playwright/test npx playwright install ``
- Configure `playwright.config.ts`
- Set
baseURLto the local dev server URL (e.g.http://localhost:3000). - Configure
webServerto start the dev server automatically:
``ts webServer: { command: "npm run dev", url: "http://localhost:3000", reuseExistingServer: !process.env.CI, }, ``
- Enable only chromium for local dev speed; enable all browsers in CI.
- Create a smoke test — write a basic test that verifies the app loads:
```ts import { test, expect } from "@playwright/test";
test("homepage loads", async ({ page }) => { await page.goto("/"); await expect(page).toHaveTitle(/.+/); }); ```
- Add page object pattern (optional) — for larger apps, create a
tests/pages/directory with page objects that encapsulate selectors and actions.
- Add npm scripts
``json { "test:e2e": "playwright test", "test:e2e:ui": "playwright test --ui" } ``
- Add to `.gitignore`
`` test-results/ playwright-report/ blob-report/ ``
- CI integration — add a GitHub Actions step that runs
npx playwright install --with-depsthennpm run test:e2e. Use the officialactions/upload-artifactto save the HTML report on failure.
Notes
- Use
data-testidattributes for selectors instead of CSS classes. - Use
test.describeto group related tests. - Run
npx playwright codegento record tests interactively.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingadding-e2e-tests/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hayotbekismoilov/all-software/adding-e2e-tests)