mirror of
https://github.com/magnus919/agent-skills.git
synced 2026-09-11 19:47:12 +03:00
ac1beb117d
Add ONE tool skill for Playwright: SKILL.md covering E2E test authoring, selector robustness, network interception/mocking, parallel workers, CI integration, scraping/headless patterns, accessibility snapshot checks, and headed debugging; scripts/pwrun (agent-first smoke harness with --json, fixture-tested); templates/ test-suite scaffold; eight dated references; a schema-valid evals/evals.json (6 cases); a human-facing README; reverse routing from qa-methodology and frontend-engineering; top-level README index entry; and regenerated catalogs (llms.txt, marketplace, codex). Closes #244. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
26 lines
948 B
TypeScript
26 lines
948 B
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
/**
|
|
* Spec scaffold: one spec per user journey, described in prose, located by
|
|
* user-facing roles/labels, asserted with web-first assertions. Copy into
|
|
* e2e/ and adapt the [fill: ...] markers.
|
|
*/
|
|
test.describe('[fill: feature under test]', () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto('/'); // [fill: app entry route, relative to baseURL]
|
|
});
|
|
|
|
test('[fill: the behavior in one sentence]', async ({ page }) => {
|
|
// Prefer getByRole / getByLabel / getByText over CSS that encodes markup.
|
|
await page.getByRole('button', { name: '[fill: button label]' }).click();
|
|
|
|
// Web-first assertions auto-retry until the timeout; never use
|
|
// page.waitForTimeout() to "fix" a race.
|
|
await expect(
|
|
page.getByRole('heading', { level: 1 }),
|
|
).toHaveText('[fill: expected heading]');
|
|
|
|
await expect(page).toHaveURL(/\/[fill: path-pattern]/);
|
|
});
|
|
});
|