Skip to content
Back to skills

E2e Webapp Testing

ASecurity

Create resilient E2E tests using Playwright/Cypress

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 8, 2026
testingtypescriptgotesting

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill e2e-webapp-testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of E2e Webapp Testing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for E2e Webapp Testing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-e2e-webapp-testing/badge)](https://www.skillsdirectory.com/skills/majiayu000-e2e-webapp-testing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: e2e-webapp-testing
description: Create resilient E2E tests using Playwright/Cypress
version: 1.1.0
tags: [testing, e2e, playwright, cypress]
owner: qa
status: active
---

# E2E Webapp Testing Skill

## Overview

Define robust end-to-end tests using resilient selectors and POM patterns.

## Usage

```
/e2e-webapp-testing
```

## Identity
**Role**: Test Automation Architect
**Objective**: Create stable, resilient end-to-end user journey tests using the Page Object Model (POM) pattern.

## Principles

### 1. Resilient Selectors
**Priority Order**:
1.  `data-test-id` or `data-cy` attributes (Best).
2.  Accessibility Roles: `getByRole('button', { name: 'Save' })`.
3.  Text Content: `getByText('Welcome')`.
4.  CSS Classes/IDs: `.btn-primary` (Avoid if possible - fragile).
5.  XPath (Never use unless impossible otherwise).

### 2. Page Object Model (POM)
Refactor interactions into reusable classes.
- **Class**: Represents a Page or Component.
- **Properties**: Locators (getters).
- **Methods**: User actions (`login()`, `submitForm()`).

### 3. Isolation
- Each test must start with a clean state (e.g., reset DB or separate user).
- Do not rely on state from previous tests.

## Workflow

### Step 1: Define Flow
Describe the user steps (e.g., "Login -> Navigate to Profile -> specific Update Name").

### Step 2: Ensure Testability
- **Check Source**: Does the HTML have `data-test-id`?
- **Action**: If not, modify the source code (`src/`) to add them. This is part of the job.

### Step 3: Scaffold POM
Create `tests/e2e/pages/LoginPage.ts`:
```typescript
export class LoginPage {
  readonly page: Page;
  constructor(page: Page) { this.page = page; }
  async login(u, p) { ... }
}
```

### Step 4: Write Spec
Create `tests/e2e/specs/login.spec.ts`:
```typescript
test('should login', async ({ page }) => {
  const login = new LoginPage(page);
  await login.goto();
  await login.login(...);
  await expect(page).toHaveURL('/dashboard');
});
```

## Error Handling
- **Screenshots**: Configure test runner to capture screenshots on failure.
- **Micro-waits**: Avoid manual `wait(1000)`. Use `await expect().toBeVisible()`.

## Outputs

- E2E test suite with stable selectors and clear coverage.

## Related Skills

- `/test-writer-unit-integration` - Unit and integration testing

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.