Skip to content

145 — Validation — submit with empty required fields shows errors

Description

Tests client-side form validation: submitting an empty form shows aria-invalid errors on required fields, modal stays open. Filling fields progressively until all required fields are present allows the save to succeed.

Preconditions

  • Clean database
  • User logged in with ADMIN role

Steps

  1. Create project, open Add opening modal, click Save immediately — Expected: Modal stays open
  2. Assert required fields show error (type, number, clearWidth, clearHeight, openingWidth, openingHeight) — Expected: aria-invalid="true"
  3. Fill dimensions but leave handles empty, click Save — Expected: Modal still open
  4. Fill exteriorHandle and interiorHandle, click Save — Expected: Opening created, modal closes
  5. Verify opening D001 in grid — Expected: Values match
  • Spec: tests/e2e/tests/doors.spec.ts TC-8