# Humand E2E Conventions

This file is the source of truth for naming, tags, annotations, and baseline stability rules.

## Naming

- Spec plan: `specs/{module}.spec.md`
- Test file: `tests/{module}/{feature}.spec.ts`
- Page object: `pages/{PageName}.ts`
- Fixture: `fixtures/{name}.fixture.ts`

## Test Structure

- Prefer `describe` blocks by feature area.
- Keep test names action-oriented and explicit.
- Keep tests independent and order-agnostic.

## Tags

- `@smoke`: critical path and availability checks
- `@regression`: stable behavior and core workflows
- `@functional`: broader multi-step journeys
- `@slow`: long-running scenarios

## Annotations

Required when possible:

- `owner`
- `module`
- `severity`

Optional:

- `jira`
- `issue`

## Stability Policy

- Fix root causes over adding sleeps or retries.
- Keep locator details in page objects.
- Use `test.fixme()` for known product gaps with a clear reason.

## Data Hygiene (self-cleaning)

- Every spec deletes the data it creates so a run leaves the tenant as it found it — no accumulation.
- Name mutating data with `Date.now()` **plus** the worker index (`${Date.now()}-${test.info().workerIndex}`) to avoid parallel collisions.
- Track created names and delete them in `afterEach` (independent tests) or `afterAll` (`serial` / cross-app suites — defer, never skip). Golden fixtures are exempt.
- See `knowledge/patterns/data-management.md` for the full pattern.
