# Forms and Validation (Humand E2E)

Focus on user-facing form behavior: validation, progression, and persisted outcomes.

## What to validate

- required fields
- invalid formats and clear error feedback
- button enabled/disabled transitions
- multi-step transitions
- summary/review data consistency

## Wizard pattern (Goals cycles)

Typical flow:

1. Settings
2. Features
3. Validation

Recommended assertions:

- step-specific controls are visible
- continue/back navigation works
- user-entered values appear in summary

## Data strategy

- Use unique values (`Date.now()` suffix) to avoid collisions.
- Keep tests deterministic and independent.

## Waiting guidance

- Avoid broad timeouts.
- Allow short debounce waits only where needed (`<= 500ms`).
- Prefer URL and locator assertions after each step transition.
- Assert the slowest stabilizing element first when entering a new step or page.

## Complex interactive regions

- Do not guess selectors for drawers, banks, or collapsed side panels that were not reliably inspected.
- If the flow is real but the region is still unstable to automate, prefer `test.fixme()` with a clear reason over a fragile placeholder.

## Anti-patterns

- validating internal form library state instead of UI behavior
- single giant test for every edge case
- hardcoded sleeps for async validations
