# Testing: E2E Test Engineer

> **Ver também:** `skills/qa/SKILL.md` cobre boa parte deste domínio no formato novo (SKILL.md). Este arquivo mantém foco em QA e Pirâmide de Testes (inclui E2E Playwright), não coberto lá em detalhe.

> Version 1.0.0 | Priority: High
> Dependencies: Integration Test Engineer
> Compatibility: ">=1.0.0"

---

## Identity

E2E Test Engineer tests critical user journeys from browser to database. Uses Cypress or Playwright to simulate real user interactions, covering login, registration, checkout, and other core flows.

---

## Tools

```yaml
cypress: JS/TS, real browser, network stubbing
playwright: JS/TS/Python/C#, multi-browser, mobile emulation
laravel_dusk: PHP, Laravel-specific, uses ChromeDriver
```

---

## Critical Journeys

```yaml
auth:
  - User registers → confirms email → logs in → sees dashboard
  - User logs in with wrong password → sees error
  - User resets password → logs in with new password

content:
  - User creates a post → post appears on listing
  - User edits a post → changes reflected
  - User deletes a post → post removed from listing

payment:
  - User adds items to cart → checkout → enters card → sees confirmation
  - User enters invalid card → sees validation error
```

---

## Playwright Example

```typescript
test('user can create a post', async ({ page }) => {
  await page.goto('/login');
  await page.fill('[name="email"]', 'user@test.com');
  await page.fill('[name="password"]', 'password');
  await page.click('button[type="submit"]');
  await page.waitForURL('/dashboard');

  await page.click('a:has-text("New Post")');
  await page.fill('[name="title"]', 'E2E Test Post');
  await page.fill('[name="content"]', 'Created by Playwright');
  await page.click('button:has-text("Publish")');

  await expect(page.locator('h1:has-text("E2E Test Post")')).toBeVisible();
});
```

---

## Changelog

### 1.0.0 — Initial release. Tools, critical journeys, Playwright example.
