E2E Testing

Playwright and Cypress patterns, selectors, assertions, API mocking, visual testing, and CI/CD

492 stars 68 forksTesting & QA

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add cosmicstack-labs/mercury-agent-skills --skill e2e-testing
Manual install
git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git /tmp/mercury-agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/mercury-agent-skills/categories/testing-qa/e2e-testing ~/.claude/skills/e2e-testing

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# E2E Testing

End-to-end testing with Playwright and Cypress.

## Tool Choice

| Factor | Playwright | Cypress |
|--------|-----------|---------|
| Language | JS/TS, Python, C#, Java | JS/TS only |
| Browser support | Chromium, Firefox, WebKit | Chromium, Firefox, WebKit |
| Iframe support | Native | Limited |
| Network mocking | Route API | intercept() |
| Parallel execution | Built-in | Dashboard required |

## Playwright Patterns

### Selector Strategy (Priority Order)
1. `getByRole()` — best for accessibility
2. `getByText()` — for text content
3. `getByTestId()` — for complex components
4. `getByLabel()` — for form fields
5. `locator(CSS)` — last resort

### Test Structure
```typescript
test.describe('Checkout Flow', () => {
  test('completes purchase with valid card', async ({ page }) => {
    await page.goto('/products');
    await page.getByText('Add to Cart').first().click();
    await page.getByRole('button', { name: 'Checkout' }).click();
    await page.getByLabel('Card Number').fill('4242424242424242');
    await page.getByRole('button', { name: 'Pay' }).click();
    await expect(page.getByText('Thank you')).toBeVisible();
  });
});
```

## Visual Testing
- Use `await expect(page).toHaveScreenshot()`
- Maintain baseline screenshots in version control
- Run visual tests on CI with 1% threshold
- Use percy.io or Chromatic for cloud-based visual review

## CI Integration
Read the full skill on GitHub

Details

Skill name
e2e-testing
Path
categories/testing-qa/e2e-testing/SKILL.md
License
MIT
Repo updated
25 August 2026

FAQ

What does the E2E Testing skill do?

Playwright and Cypress patterns, selectors, assertions, API mocking, visual testing, and CI/CD

How do I install the E2E Testing skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add cosmicstack-labs/mercury-agent-skills --skill e2e-testing. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is E2E Testing popular?

It lives in cosmicstack-labs/mercury-agent-skills, which has 492 GitHub stars and 68 forks.

Related skills

Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.