test-standards
Skill268 starsChanged 11 days agoMITView on GitHub
Use when creating or editing a spec file under tests/**, choosing a test type or tag, writing a data-driven loop, or wiring cleanup for a state-mutating test. Not for API coverage matrices (see `api-testing`) or factories and static data (see `data-strategy`).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- BackToCimaCoppi/Praxistheir own version, first seen Sep 23, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- BackToCimaCoppi/Praxis★ 6same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-native-workflowSkill
- api-testingSkill
- common-tasksSkill
- configSkill
- data-strategySkill
- debuggingSkill
- enumsSkill
- fixturesSkill
- helpersSkill
- page-objectsSkill
- playwright-cliSkill
- pr-reviewerSkill
- refactor-valuesSkill
- selectorsSkill
- skill-creatorSkill
- type-safetySkill
- ai-native-workflowSkill
- api-testingSkill
- common-tasksSkill
- configSkill
- data-strategySkill
- debuggingSkill
- enumsSkill
- fixturesSkill
- helpersSkill
- page-objectsSkill
- playwright-cliSkill
- pr-reviewerSkill
- refactor-valuesSkill
- selectorsSkill
- skill-creatorSkill
- test-standardsSkill
- type-safetySkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 10
Import test and expect from fixtures/pom/test-options.ts, never from @playwright/test.
- Very specific: line 32
Never commit explore-only or debug specs (console.log(await page.content()), probes).
- Very specific: line 33
After adding or modifying a spec, run npx playwright test <file> and confirm zero failures before reporting done.
- Very specific: line 42
If the test mutates state, add the cleanup hook per references/destructive-tests.md.
- Very specific: line 43
Run npx playwright test <file> and npm run lint.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test Standards
Critical
- Import
testandexpectfromfixtures/pom/test-options.ts, never from@playwright/test. Each test has exactly one tag from
@smoke,@sanity,@regression,@e2e,@api,@destructive. Never@functional, never a tag array, never a tag ontest.describe().// CORRECT test('should login', { tag: '@smoke' }, async ({ appPage }) => {}); // WRONG test('should login', { tag: ['@smoke', '@e2e'] }, async () => {});@destructiveis the heaviest tag and always wins, but only for shared/global state (locale, permissions, roles, guest access, feature flags, global settings, shared seed data). A test that creates and removes only its own data keeps its importance tag.- Every state-mutating test has a
test.afterEach()ortest.afterAll()hook that reverts what it wrote, and the hook succeeds after a failed test. Web-first assertions only:
await expect(locator).toBeVisible(),.toHaveText(),.toHaveCount(). Neverpage.waitForTimeout().// CORRECT await expect(appPage.username).toBeVisible(); // WRONG await page.waitForTimeout(1000);- Tests must be independent: no ordering, no shared mutable state. Setup goes in
test.beforeEach()or a fixture. - Never commit explore-only or debug specs (
console.log(await page.content()), probes). - After adding or modifying a spec, run
npx playwright test <file>and confirm zero failures before reporting done.
Procedure
- Classify: functional (
tests/{area}/functional/), API (tests/{area}/api/), E2E (tests/{area}/e2e/) or setup (tests/{area}/*.setup.ts). Runls tests/to resolve{area}. - Open the nearest spec of the same type and copy its import,
describeandbeforeEachshape; a spec that must start signed out (login, anonymous forms) callsresetStorageState()inbeforeEach; everything else starts signed in. Skeletons:references/spec-patterns.md. - Tag the test; when unsure which importance tag applies, read
references/tags.md. - Split the body into
test.step()blocks named GIVEN / WHEN / THEN. An API test with more than one call followsapi-testing. - Take values from a factory or a static
.tsfile perdata-strategy; a data-drivenfor...ofloop sits insidedescribe, outsidetest(). - If the test mutates state, add the cleanup hook per
references/destructive-tests.md; API setup or teardown shared by several specs goes throughapi-testing. - Run
npx playwright test <file>andnpm run lint; on red, loaddebugging.
References
references/spec-patterns.md: skeletons for a functional, data-driven, E2E and setup spec.references/tags.md: what each tag covers, how each suite runs, the three tagging mistakes.references/destructive-tests.md: the shared-state definition, the cleanup pattern, the destructive suite, suite-only failures.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

