e2e-testing

Solid

Load when a task needs durable Playwright E2E suites, Page Object Models, fixtures, CI browser tests, or flaky-test strategy; use webapp-testing for one-off local inspection.

Testing & QA 84 stars 0 forks Updated 4 days ago

Install

View on GitHub

Quality Score: 78/100

Stars 20%
64
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
0
Description 5%
100

Skill Content

# E2E Testing Patterns Reuse the project's existing E2E runner and conventions. New projects default to Playwright. One test should prove one user outcome through the same controls and feedback a user sees. ## Behavior Contract - Wait for the required heading, control, URL, status, or result; network silence and elapsed time are not readiness signals. - Prefer role, label, and visible text locators. Use a test ID only when no stable user-facing locator exists. - Keep setup deterministic and local. Reuse project fixtures, auth helpers, and data factories before adding another layer. - Assert the outcome in the test, including loading, empty, error, permission, recovery, and destructive states when they matter. ```typescript import { expect, test } from '@playwright/test' test('filters items', async ({ page }) => { await page.goto('/items') await expect(page.getByRole('heading', { name: 'Items' })).toBeVisible() await page.getByLabel('Search items').fill('alpha') await expect(page.getByRole('article').first()).toContainText(/alpha/i) }) ``` ## Extraction Boundary Use a page object only when several tests repeat the same stable navigation or interaction. Keep outcome assertions in the test; avoid generic base pages, wrappers for single locators, and a second fixture system. Organize tests by user capability using the repository's current layout. Do not reorganize an established suite merely to match a template. ## Coverage And Configuration Use a risk-based bro...

Details

Author
JasonxzWen
Repository
JasonxzWen/harness-hub
Created
4 months ago
Last Updated
4 days ago
Language
JavaScript
License
None

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category